![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
深度学习
NoOne-csdn
永远年轻,永远热泪盈眶
展开
-
Keras小知识点
np_utils.to_categorical()Converts a class vector (integers) to binary class matrix.将向量转换为二进制的矩阵to_categorical(y, num_classes=None, dtype=‘float32’)demo:from keras.utils import np_utilsb = [0, 1...原创 2020-01-10 11:28:21 · 241 阅读 · 0 评论 -
深度学习笔记(pandas,spark,keras,TF关联小知识)
label one-hot编码发现from keras.utils.np_utils import to_categorical 的to_categorical函数和pandas.get_dummies()实现的功能相同。都是对目标对象 one-hot编码to_categorical(y, num_classes=None, dtype=‘float32’)def get_dummies...原创 2019-10-16 16:05:41 · 369 阅读 · 0 评论 -
Keras model.fit()参数详解
fit(x=None, y=None, batch_size=None, epochs=1, verbose=1, callbacks=None, validation_split=0.0, validation_data=None, shuffle=True, class_weight=None, sample_weight=None, initial_epoch=0, steps_per_ep...原创 2019-10-12 14:52:39 · 73923 阅读 · 6 评论 -
改善深层神经网络:超参数调试、正则化以及优化之学习笔记(week1)
train/dev/test sets训练集、开发集和测试集bias/variance偏差和方差高偏差(high bias):欠拟合 underfitting高方差 high variance:过拟合 overfittingtrain set error1%Dev set error11%high varianceBasic Recipe ...原创 2019-09-29 10:47:51 · 180 阅读 · 0 评论 -
Keras 损失函数作用及公式
损失函数的使用作用损失函数(或称目标函数、优化评分函数)是编译模型时所需的两个参数之一from keras import lossesmodel.compile(loss=losses.mean_squared_error, optimizer='sgd')你可以传递一个现有的损失函数名,或者一个 TensorFlow/Theano 符号函数。 该符号函数为每个数据点返回一个标量,有...原创 2019-10-10 10:15:36 · 1336 阅读 · 0 评论 -
Keras评估标准Metrics
作用评估函数用于评估当前训练模型的性能。当模型编译后,评价函数应该作为metrics的参数输入from keras import metricsmodel.compile(loss='mean_squared_error', optimizer='sgd', metrics=[metrics.mae, metrics.categori...原创 2019-10-10 10:37:51 · 7637 阅读 · 1 评论