Closed NonoLG closed 5 years ago
Yes, absolutely. You can definitely add a CNN output layer to the inference_dict
in policy.py
and save it out to numpy or use opencv to view it live. Tensorflow also offers a general solution to visualizing Tensors using Tensorboard: https://github.com/tensorflow/tensorboard/blob/master/tensorboard/plugins/debugger/README.md
Thanks for the info. For guys as me who do not have that much knowledge of TensorFlow and Tensorboard, do you any example or some code I could use please ?
There many code files, I do not find where modify things.
@NonoLG It's absolutely possible. (I've been modifying python API twice for my projects)
So, this is way how I got my information from python API side. But be careful. Its very complicated. I'd recommend you to backup your anaconda ml-agent module before making any modification.
Here, I'd assume you are training via PPO / without curiosity
self.inference_dict = {'action': self.model.output, 'log_probs': self.model.all_log_probs,
'value': self.model.value, 'entropy': self.model.entropy,
'learning_rate': self.model.learning_rate,
'my_out_1' : self.model.out_1,
'my_out_2' : self.model.out_2}
Thanks a lot for your answer. Just, what do you mean by "your_output" please ?
@NonoLG That means any of ouput you want to see like output from certain cnn later. like here you can pick one of output (i.e. after first cnnl layer) output = tf.conv2d(input, ...) self.out = output output = tf.conv2d(output, ...) output = tf.conv2d(output, ...)
Thanks for your help, but I noob level doesn't enable me to find the way to do it —'
If somebody tried it on his side and would be ready to share it, would be incredible :D
Thank you for the discussion. We are closing this issue due to inactivity. Feel free to reopen it if you’d like to continue the discussion though.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Hi all,
I am currently working on project using Visual Information as observation for my agent. I would like to get more details on how does it process the visual information and interpret this to optimize my settings and have a better understanding of the way it works. Anyone has information or ideas of scripts I could use to visualize CNN outputs used in ml-agents please ?
Do you think we could custom the models.py script to show the Convolutional Layers output when training ?
Thanks