Structure a Keras Tensorboard graph -
when create simple keras model
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'])
and callback 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])
the output in tensorboard looks this:
in other words, it's complete mess.
- is there can make graphs output more structured?
- how can create histograms of weights keras , tensorboard?
you can create name scope group layers in model using k.name_scope('name_scope')
.
example:
with k.name_scope('customlayer'): # add first layer in new scope x = globalaveragepooling2d()(x) # add second connected layer x = dense(1024, activation='relu')(x)
thanks https://github.com/fchollet/keras/pull/4233#issuecomment-316954784
Comments
Post a Comment