nbdev-pytorch

raw JSON →
0.0.2385 verified Sat May 09 auth: no python

nbdev-pytorch provides nbdev doc lookup for PyTorch functions and classes. Supports Python >=3.6. Version 0.0.2385 is the latest; release cadence is irregular as part of the fastai nbdev ecosystem.

pip install nbdev-pytorch
error ModuleNotFoundError: No module named 'nbdev.pytorch'
cause Trying to import using dot notation instead of underscore.
fix
Use 'import nbdev_pytorch' or 'from nbdev_pytorch import pytorch_doc'
error AttributeError: module 'nbdev' has no attribute 'pytorch'
cause Assuming nbdev has a pytorch submodule; it does not. You need the separate nbdev-pytorch package.
fix
Install nbdev-pytorch and import from nbdev_pytorch
gotcha Module name uses underscores: nbdev_pytorch, not nbdev-pytorch (npm style). Incorrect imports will raise ModuleNotFoundError.
fix Use 'import nbdev_pytorch' or 'from nbdev_pytorch import ...'
deprecated If you were using nbdev's built-in doc lookup for PyTorch, that functionality may be moved to nbdev-pytorch. Check if your imports still work after upgrading nbdev.
fix Explicitly install nbdev-pytorch and import from nbdev_pytorch

Import nbdev-pytorch and use pytorch_doc to get documentation for any PyTorch symbol.

from nbdev_pytorch import pytorch_doc

# Look up PyTorch function docs
pytorch_doc(torch.nn.Linear)
pytorch_doc(torch.softmax)