ModuleNotFoundError: No module named ‘torch.utils.serialization’
Could you post the code which is throwing this error?
I haven’t given full code i have just given glimpse of it and since i am new to deeplearning i have picked up this code from github page https://github.com/szagoruyko/cvpr15deepcompare in pytorch, eval.py
from torch.utils.serialization import load_lua
import argparse
parser = argparse.ArgumentParser(description=‘DeepCompare PyTorch evaluation code’)
here deep* represents the functions
models = {
‘2ch’: deepcompare_2ch,
‘2ch2stream’: deepcompare_2ch2stream,
‘siam’: deepcompare_siam,
‘siam_l2’: deepcompare_siam_l2,
‘siam2stream’: deepcompare_siam2stream,
‘siam2stream_l2’: deepcompare_siam2stream_l2,
}
def main(args):
opt = parser.parse_args(args)
print(‘parsed options:’, vars(opt))
f = models[opt.model]
net = load_lua(opt.lua_model)
I have seen this but unable to understand is there any alternative in pytorch for torch.utils.serialization and load_lua.