hasktorch-0.2.0.0: Functional differentiable programming in Haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Torch.Serialize

Synopsis

Documentation

save Source #

Arguments

:: [Tensor]

inputs

-> FilePath

file

-> IO ()

output

load Source #

Arguments

:: FilePath

file

-> IO [Tensor]

output

pickleSave Source #

Arguments

:: IValue

inputs

-> FilePath

file

-> IO ()

output

Save state_dict

pickleLoad Source #

Arguments

:: FilePath

file

-> IO IValue

output

Load a state_dict file You should use a dict function of pytorch to save a state_dict file as follows.

torch.save(dict(model.state_dict()), "state_dict.pth")

saveParams Source #

Arguments

:: Parameterized f 
=> f

model

-> FilePath

filepath

-> IO ()

output

loadParams Source #

Arguments

:: Parameterized b 
=> b

model

-> FilePath

filepath

-> IO b

output

class RawFile a where Source #

Methods

loadBinary :: Handle -> a -> IO a Source #

saveBinary :: Handle -> a -> IO () Source #

Instances

Instances details
RawFile Tensor Source # 
Instance details

Defined in Torch.Serialize