tensorflow
我在浪里
I LOVE Coding,冲刺中。。。
展开
-
用keras时,自建LossHistory类保存机器学习算法运行过程中的loss和acc
LossHistory类:class LossHistory(keras.callbacks.Callback): def on_train_begin(self, logs={}): self.losses = {'batch':[], 'epoch':[]} self.accuracy = {'batch':[], 'epoch':[]} ...原创 2019-07-27 16:22:28 · 3489 阅读 · 4 评论 -
查看tensorflow变量值
1.tf.Session()import tensorflow as tfsess=tf.Session()w1=tf.Variable(5,dtype=tf.int32)sess.run(tf.global_variables_initializer())print(sess.run(w1))2.with结构import tensorflow as tfw1=tf.Vari...原创 2019-08-26 14:26:17 · 872 阅读 · 0 评论 -
PCA降维+SVM/DNN训练手写数字数据集
总是搜不到自己想要的程序。。。。emmm,那就自己写咯import numpy as npimport pandas as pd import seaborn as snsimport matplotlib.image as mpimgimport matplotlib.pyplot as pltimport matplotlibimport randomimport tens...原创 2019-09-10 14:26:00 · 1268 阅读 · 2 评论