深度学习
y_hh_
这个作者很懒,什么都没留下…
展开
-
神经网络模型过程的可视化
题目中的可视化是指,对于特定层输出结果的获取。主要的代码如下:cnnModel = #a model you have defined with layers假设想要得到的第1,5,8层的输出from keras.models import ModeldesiredLayers = [1,5,8]desiredOutputs = [cnnModel.layers[i].output for i in desiredLayers] #alternatively, you can use cn翻译 2020-10-19 19:55:51 · 504 阅读 · 0 评论 -
ValueError: Supported target types are: (‘binary‘, ‘multiclass‘). Got ‘multilabel-indicator‘ instead
ValueError: Supported target types are: (‘binary’, ‘multiclass’). Got ‘multilabel-indicator’ instead.在使用StratifiedKFold进行交叉检验时报错。kfold = StratifiedKFold(n_splits=10, shuffle=True, random_state=42)for train_index, test_index in kfold.split(x, y): ....原创 2020-07-04 13:31:12 · 6300 阅读 · 5 评论