I’m trying to load the weights turns out the file I was trying to get weight from is never have the weights but the content below.

image.png875×156 8 KB

This is how I save weights adding decode(‘utf-8’) didn’t change the result.
    # Save the weights.
    if epoch % save_every == 0:
        torch.save(decoder.state_dict(), os.path.join('./models', 'decoder-%d.pkl' % epoch).decode('utf-8') )
        torch.save(encoder.state_dict(), os.path.join('./models', 'encoder-%d.pkl' % epoch).decode('utf-8') )

# Close the training log file.
f.close()