Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

load_state_dict

Load a state dict file


Description

This function should only be used to load models saved in python. For it to work correctly you need to use torch.save with the flag: _use_new_zipfile_serialization=True and also remove all nn.Parameter classes from the tensors in the dict.

Usage

load_state_dict(path)

Arguments

path

to the state dict file

Details

The above might change with development of this in pytorch's C++ api.

Value

a named list of tensors.


torch

Tensors and Neural Networks with 'GPU' Acceleration

v0.3.0
MIT + file LICENSE
Authors
Daniel Falbel [aut, cre, cph], Javier Luraschi [aut], Dmitriy Selivanov [ctb], Athos Damiani [ctb], Christophe Regouby [ctb], Krzysztof Joachimiak [ctb], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.