Skip to content

Glossary: Deep Learning Basics

weights_only=True

Also written: weights_only

A `torch.load` setting that accepts only tensors and plain values like numbers, strings, lists and dicts, refusing anything else. It's the default since PyTorch 2.6, but write it anyway.

Where the book teaches it

Related terms

Pickletorch.save / torch.loadstate_dict