当我创建一个简单的Keras模型
model = Sequential()
model.add(Dense(10, activation='tanh', input_dim=1))
model.add(Dense(1, activation='linear'))
model.compile(loss='mean_squared_error', optimizer='adam', metrics=['mean_squared_error'])然后给Tensorboard打个电话
tensorboard = TensorBoard(log_dir='c:/temp/tensorboard/run1', histogram_freq=1, write_graph=True, write_images=False)
model.fit(x, y, epochs=1000, batch_size=1, callbacks=[tensorboard])Tensorboard中的输出如下所示:

换句话说,这是一个完全的混乱。
发布于 2017-08-01 13:26:53
使用K.name_scope('name_scope'),您可以创建一个名称范围来对模型中的层进行分组。
示例:
with K.name_scope('CustomLayer'):
# add first layer in new scope
x = GlobalAveragePooling2D()(x)
# add a second fully connected layer
x = Dense(1024, activation='relu')(x)多亏了https://github.com/fchollet/keras/pull/4233#issuecomment-316954784
https://stackoverflow.com/questions/45309153
复制相似问题