infocusp / tf_cnnvis

CNN visualization tool in TensorFlow
MIT License
780 stars 208 forks source link

Visualization of open Sessions and fix to Example 2 #32

Closed csggnn closed 6 years ago

csggnn commented 6 years ago

To my understanding the previous version would only visualize saved session (with PATH input) or Graphs. Graphs for training only store the definition of their weight and biases in variables, the value learnt by training is only part of the open session running the graph. Example 1 worked with graph where the variable values to be visualized were set as the initialization values in graph definition. Example 3 worked with a frozen graph where variables had been substituted by constants. Example 2 used the default configuration and actually visualized random weights. I added support for open Session visualization (alongside frozen graph and path) so that Example 2 could work without modifying the training graph.

falaktheoptimist commented 6 years ago

Hi @csggnn Thank you so much for finding this bug and for the pull request. One change we wish here is - if the user passes in the graph, we should check if it contains any variables. And if it does, we want to break with an error message. This is because people using this tool may not understand/ care about the "frozen" graph part and just pass in their non frozen graph, which would then have the same bug as our current version does. Thanks!

falaktheoptimist commented 6 years ago

We're making these changes from our end directly.

csggnn commented 6 years ago

Great! Glad it helped. Well using a graph input makes sense only in some special cases with which the ne novice tensorflow programmer may not be familiar with (me included). Probaly the most user friendly approach would be to remove the graph input option altoghether and impose a session as input and complain if it is closed or non initialized. One can always open a session on a frozen graph and pass it as input if he knows what he is doing, as this would happen inside the code before saving anyways