Model trained in 0.4.1 on CUDA 9.0 is not working in 0.4.0 on same CUDA

I am working on a Siamese structured model, it was trained in PyTorch-0.4.1. I have implemented the inference in the same version of PyTorch, that works. But inferring on a system with PyTorch-0.4.0 gives the following issue:

Unexpected key(s) in state_dict: “bn1.num_batches_tracked”, “bn2.num_batches_tracked”, “bn3.num_batches_tracked”, “bn4.num_batches_tracked”, “bn5.num_batches_tracked”.

I don’t have a clue on what is wrong. Upgrading from 0.4.0 to 0.4.1 will solve, but can I solve without the upgrade.

Please help.

Loading checkpoints is not forward compatible. So please either upgrade, or for this particular case remove those keys as they don’t matter (only for this particular case).

1 Like

Facing similar issue, trying to load a model trained on 0.4.1 from a 0.4.0 environment.