-
Notifications
You must be signed in to change notification settings - Fork 19.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tensorboard not working with Trainer Pattern #20809
Comments
I fixed it like this but obviously this is not the underlying cause:
|
Thanks for posting the issue @GeraudK! Old Behavior: New Behavior: Edit: I do have the fix, which is backward compatible and replicates the above behavior, but I think it's worthwhile to wait and deliberate over since the objectives of this issue have become much clearer. |
Hi @harshaljanjani thank you for taking on this issue. Yes, this is somehow what I'm looking for although I would imagine to have separate section per layer like below for layers |
Sounds great @GeraudK. Honestly, while that sounds like a lovely change, it would require a major refactor while ensuring backward compatibility, which would require guidance from the collaborators. Till then, I think the primary focus should be on the task of figuring out if a minor change may fix the primary bug to which this issue was raised, and maybe the feature you're describing can be incorporated in a later PR down the issue thread; thanks! |
@harshaljanjani I'm not talking about the gradients, which of course is beyond this issue. But I think that TensorBoard should at least show different histograms for different layers, otherwise what's the point? I mean the main goal of using these histograms is to see change in weights from one epoch to the other and see what part of the network is training. If you can't have that granularity then I'm not sure what this is used for. Searching for a few histograms examples on the web shows that this used to be the case, and you would always have one section per layer (like another image below) |
I see the broader scope of the issue now. It seemed to me that the focus was on identifying the root cause of the combination of the parameters in the source code and replicating the division akin to the hack fix in the thread, but I now see that bringing back the layer-wise division and interpretable histograms is the key concern; thanks for the clarification. |
I'm using the Keras Trainer pattern as illustrated here. The issue when using this pattern is that when you use Tensorboard only the top level weights are being recorded.
The reason for this is that
Tensorboard
is recording the weights for the all the layers inself.model.layers
here. But this equal to[<Sequential name=sequential, built=True>]
and the weights for that Sequential object is []I tried several things:
layers
method in the Trainer object to haverecursive=True
but the weights were still not showing in TensorBoard suggesting that something else is going onI'm open to any suggestions here.
full example
The text was updated successfully, but these errors were encountered: