我想使用keras + tensorboard。我的架构看起来像这样:
tbCallBack = TensorBoard(log_dir='./logs', histogram_freq=2, batch_size=32, write_graph=True, write_grads=True, write_images=True)
K.clear_session()
sess = tf.Session()
K.set_session(sess)
input_img = Input(shape=(augmented_train_data[0].shape[0], augmented_train_data[0].shape[1], 3))
x = Conv2D(8, (1, 1), padding='same', activation='relu', name="1x1_1")(input_img)
x = Conv2D(16, (3, 3), padding='same', activation='relu', name="3x3_1")(x)
x = Conv2D(32, (3, 3), padding='same', activation='relu', name="3x3_2")(x)
x = Conv2D(1, (1, 1), padding='same', activation='relu', name="1x1_2")(x)
x = Flatten()(x)
x = Dense(16, activation='relu')(x)
output = Dense(2)(x)
model = Model(inputs=input_img, outputs=output)
model.compile(optimizer='adam', loss='mean_squared_error')
#tbCallBack.set_model(model)
print(model.summary())
history = model.fit(augmented_train_data, augmented_train_label, validation_data=[augmented_validation_data, augmented_validation_label] ,epochs=20, batch_size=32, callbacks=[tbCallBack])
查看tensorboard图像选项卡时,它看起来像 我不能完全解释这一点,但我认为这个标签会显示我的卷积的重量如何在时代中发展。那么,如何解读这些图像。或者我在设置张量板时犯了错误?
答案 0 :(得分:2)
看起来正是您所得到的。图像的灰度显示权重。顶部的滑块可用于来回滑动,以查看训练进度。