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: enter image description here

in other words, it's complete mess.

  1. is there can make graphs output more structured?
  2. 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

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -