ndif-team / nnsight

The nnsight package enables interpreting and manipulating the internals of deep learned models.
https://nnsight.net/
MIT License
359 stars 34 forks source link

implement zero using pytorch tensor functions #126

Closed sheikheddy closed 4 months ago

sheikheddy commented 4 months ago

Quick fix for RuntimeError: a view of a leaf Variable that requires grad is being used in an in-place operation.

See https://discuss.pytorch.org/t/post-processing-model-output-while-retaining-gradients/181602.