The same error with torch.load occurred to me after I mistakenly set the size of unused embedding layer to 0. This network consumed a day of computational time. Could there be a way to bypass the error and load it (maybe ignoring empty layer)?