构建Keras Tensorboard图

时间:2017-07-25 16:40:36

标签: keras tensorboard

当我创建一个简单的Keras模型

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'])

并对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])

Tensorboard中的输出如下所示: enter image description here

换句话说,这是一个完整的混乱。

  1. 我能做些什么来使图表输出看起来更结构化?
  2. 如何使用Keras和Tensorboard创建权重直方图?

1 个答案:

答案 0 :(得分:4)

您可以使用import AVKit class AudioManager { static var sharedInstance = AudioManager() private var player: AVPlayer? func play() { // TODO: Initialize AVPlayer with desired audio track & start playing // player = AVPlayer(...) player?.play() // Register for the did play to end time notification to loop audio if let item = player?.currentItem { NotificationCenter.default.addObserver(self, selector: #selector(onPlaybackFinished), name: .AVPlayerItemDidPlayToEndTime, object: item) } } @objc private func onPlaybackFinished() { player?.seek(to: kCMTimeZero) player?.play() } } // to start playback from anywhere in your app AudioManager.sharedInstance.play() 创建名称范围,以便对模型中的图层进行分组。

示例:

K.name_scope('name_scope')

谢谢 https://github.com/fchollet/keras/pull/4233#issuecomment-316954784