avoid segfault if required class is not already loaded.
trying to load an object that contains a class that is not loaded yet causes the problem.

require 'nn'
m=nn.Linear(10,20)
torch.save('m.obj',m)
Really quit [y/N]? y

torch.load('m.obj')
1 file changed