netket
netket copied to clipboard
Model Validation
#1001 Made me realise that if somebody writes a model that outputs the wrong shape (can happen when working with 2D convolution if one forgets to reshape the final output, as happened to me there) the model.init
is successful because it gives a valid output, but then the samplers and the gradients break down because the shapes are all wrong.
Once this happens, errors are quite hard to understand.
We could check when running model.init
that the output has the shape we expect to work with netket (a 1D vector) and throw an error if not, suggesting to check the model's output shape.
Yes, this would be great!
On Sun, Nov 28, 2021, 11:13 Filippo Vicentini @.***> wrote:
#1001 https://github.com/netket/netket/issues/1001 Made me realise that if somebody writes a model that outputs the wrong shape (can happen when working with 2D convolution if one forgets to reshape the final output, as happened to me there) the model.init is successful because it gives a valid output, but then the samplers and the gradients break down because the shapes are all wrong.
Once this happens, errors are quite hard to understand.
We could check when running model.init that the output has the shape we expect to work with netket (a 1D vector) and throw an error if not, suggesting to check the model's output shape.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/netket/netket/issues/1003, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGWYRBFVAX7PYZDYDC76XFTUOH6DHANCNFSM5I5EBYHQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.