You are still running into the same error as described here and as already explained, you won’t be able to load the state_dict of your custom module into a resnet. ChatGPT is still wrong and you should load the state_dict into an object of your custom model instead.