在callback函數中添加tensorboard,啓用tensorboard。函數
# TensorBoard callback tensorboard_cb = K.callbacks.TensorBoard( log_dir=MyTensorBoardDir, histogram_freq=1, write_graph=True, write_images=True )
在fit數據的時候,把該回調添加進去spa
model.fit(x,y,epochs=Epoch,batch_size=16,verbose=2,validation_split=0.2,callbacks=callbackList)