% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/save.R
\name{load_state_dict}
\alias{load_state_dict}
\title{Load a state dict file}
\usage{
load_state_dict(path, ..., legacy_stream = FALSE)
}
\arguments{
\item{path}{to the state dict file}

\item{...}{additional arguments that are currently not used.}

\item{legacy_stream}{if \code{TRUE} then the state dict is loaded using a
a legacy way of handling streams.}
}
\value{
a named list of tensors.
}
\description{
This function should only be used to load models saved in python.
For it to work correctly you need to use \code{torch.save} with the flag:
\verb{_use_new_zipfile_serialization=True} and also remove all \code{nn.Parameter}
classes from the tensors in the dict.
}
\details{
The above might change with development of \href{https://github.com/pytorch/pytorch/issues/37213}{this}
in pytorch's C++ api.
}
\concept{serialization}
