Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- save :: [Tensor] -> FilePath -> IO ()
- load :: FilePath -> IO [Tensor]
- pickleSave :: IValue -> FilePath -> IO ()
- pickleLoad :: FilePath -> IO IValue
- saveParams :: Parameterized f => f -> FilePath -> IO ()
- loadParams :: Parameterized b => b -> FilePath -> IO b
- class RawFile a where
- loadBinary :: Handle -> a -> IO a
- saveBinary :: Handle -> a -> IO ()
Documentation
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")
:: Parameterized f | |
=> f | model |
-> FilePath | filepath |
-> IO () | output |
:: Parameterized b | |
=> b | model |
-> FilePath | filepath |
-> IO b | output |