Skip to content

Glossary: Computer Vision Basics

weights_only

Also written: weights_only=True

An option of `torch.load` that refuses to run code hidden in a file and allows only tensors, numbers, strings, lists and dicts. It is the default since PyTorch 2.6, which is why the checkpoint stores the version with `str()`.

Where the book teaches it

Related terms

checkpointstate_dict