I’m using a sequence of legacy modules because I have loaded a model by means of
torch.utils.serialization.load_lua(), and that is what it gave me.
I have sundry modules inside of a
torch.legacy.nn.Sequential. I’m performing inference on a number of images; the first image runs through the
Sequential fine, but if I try to pass a second image through, the following error is thrown:
RuntimeError: calling resize_ on a tensor that has non-resizable storage. Clone it first or create a new tensor instead
This occurs in the first
torch.legacy.nn.Linear module in the
Sequential, at torch/legacy/nn/Linear.py line 47:
I’m at a loss. (All of the images are the same size, in case that matters.) Can anyone advise me? Why does this error arise? What can I do to avoid it?