3
我試圖用Tensorboard形象化Keras模型的權重。下面是我使用的模型:Keras Tensorboard回調不寫圖像
model = Sequential([
Conv2D(filters=32, kernel_size=(3,3), padding="same", activation='relu', input_shape=(40,40,3)),
MaxPooling2D(pool_size=(2, 2)),
Conv2D(filters=64, kernel_size=(5,5), padding="same", activation='relu'),
MaxPooling2D(pool_size=(2, 2)),
Flatten(),
Dense(1024, activation='relu'),
Dropout(0.5),
Dense(43, activation='softmax'),
])
model.compile(optimizer='sgd',
loss='categorical_crossentropy',
metrics=['accuracy'])
,我這個電話訓練:
model.fit_generator(
...
callbacks = [
ModelCheckpoint('models/gtsrb1-{epoch}.hdf5', verbose=1, save_best_only = True),
TensorBoard(log_dir='tblogs/', write_graph=True, write_grads=True, write_images=True),
EarlyStopping(patience=5, verbose=1),
],)
然而,當我啓動TensorBoard,這就是我得到:
標量和圖看起來不錯,所以它不是一個錯誤的問題logdir
。我在這裏做錯了什麼?
同樣的問題。你有沒有得到它的任何地方? – DrMcCleod