IntelLabs / coach

Reinforcement Learning Coach by Intel AI Lab enables easy experimentation with state of the art Reinforcement Learning algorithms
https://intellabs.github.io/coach/
Apache License 2.0
2.32k stars 461 forks source link

Can't visualize tensorflow graph #328

Closed lrthorita closed 5 years ago

lrthorita commented 5 years ago

I have run the CartPole_DQN preset to see how it works. After training, I tried to see the dashboard and the tensorboard. The problem is that I can't see the Neural Network graph on tensorboard. Since the code saves the ''graphdef.pb", shouldn't it be there?

Basically, what I did was running the preset by using: coach -p CartPole_DQN -s 1800 (I set -s 1800 to save checkpoints of the model for each 30 minutes.

Then, I used tensorboard --logdir /path/to/checkpoints/dir/ to try to see the neural network graph.

gal-leibovich commented 5 years ago

Hi @lrthorita, I am not sure why isn't the graph visible on Tensorboard on your setup. It is working fine over here, please see below.

image

Anyway, I don't think it is easy to understand the network layout from Tensorboard. This is why we have implemented a feature to textually summarize the graph layout, accessible through the --print_networks_summary flag. For instance, this is what you'll be getting for CartPole_DQN:

Network: main, Copies: 2 (online network | target network)

Input Embedder: observation Input size = [4] Dense (num outputs = 256) Activation (type = <function relu at 0x7f5958bcb378>) Middleware: Dense (num outputs = 512) Activation (type = <function relu at 0x7f5958bcb378>) Output Head: q_values_head Dense (num outputs = 2)

lrthorita commented 5 years ago

Hi @galleibo-intel! Thank you for answering.

I'll try the textual summary feature as soon as I can. About the TensorFlow, is there any restriction about its version? I'm using 1.10.

gal-leibovich commented 5 years ago

Hi @lrthorita,

You're welcome. Yeah, 1.10 should be ok AFAIK.