Is possible to save PyTorch model as string?

I wonder if possible to save trained PyTorch model as string in text file and load the model from this string?

I try with function torch.save(model.state_dict(), PATH)
but there is nos satisfying results.

Peter

Could you explain a bit which results are not satisfying and how the storage as a string would avoid it?

1 Like