Tensoboard回调花费的时间太长

时间:2019-04-19 19:11:08

标签: keras tensorboard

我试图在张量板上可视化训练,正在使用keras进行拟合

print('replaying for agent:{}'.format(self.agent_name))
        minibatch = random.sample(list(self.memory), self.batch_size)
        for state, action, reward, next_state in minibatch:
            # print "Reward: {}".format(type(reward))
            target = reward + self.gamma * np.max(self.regressor.predict(next_state)[0])
            target_f = self.regressor.predict(state)
            # print target_f
            # print target
            target_f[0][action] = target

            self.regressor.fit(state, target_f, epochs=1, verbose=0,callbacks=[self.tensorboard])  #, 
        if self.exploration > self.min_exploration:
            self.exploration *= self.exploration_decay
        print('replaying for agent:{} done.'.format(self.agent_name))

但是当我删除callbacks时,该过程运行得更快,如何正确配置回调?

0 个答案:

没有答案