d2l-ai / d2l-en

Interactive deep learning book with multi-framework code, math, and discussions. Adopted at 500 universities from 70 countries including Stanford, MIT, Harvard, and Cambridge.
https://D2L.ai
Other
22.62k stars 4.2k forks source link

Use of deprecated torch.norm #2528

Closed dhzdhd closed 10 months ago

dhzdhd commented 1 year ago

The PyTorch examples in the Norms section of Preliminaries - Linear Algebra contain the usage of torch.norm.

According to torch docs torch.norm is deprecated and torch.linalg.vector/matrix_norm should be used.

I can help in contributing to fixing the issue if this is indeed a problem

AnirudhDagar commented 1 year ago

Thanks @dhzdhd for raising the issue. Yeah, we'll welcome a PR with the fix that you already mention.

It would be great to check the usage of torch.norm throughout the book (search entire repo cmd+f) and replace wherever encountered.

dhzdhd commented 1 year ago

Alright, i would like to work on this.

dhzdhd commented 1 year ago

Unable to proceed due to https://github.com/d2l-ai/d2l-book/issues/75