I have this Issue when try to load Pytorch Model
this is the code:
LOAD MODEL
device, epoch, model_name, model, optimizer_name,\
optimizer, optimizer_opts, loss_name, loss_func, weight_g,\
loss_history, loss_history_for_batch, valid_history,\
f2_score_history, epoch_loss_history, total_time_min = machine.load(
model_file, gpu_id
)
And show me this Error:
RuntimeError: Error(s) in loading state_dict for VGG11:
size mismatch for linear_layers.6.weight: copying a param with shape torch.Size([3, 4096]) from checkpoint, the shape in current model is torch.Size([1, 4096]).
size mismatch for linear_layers.6.bias: copying a param with shape torch.Size([3]) from checkpoint, the shape in current model is torch.Size([1]).