TypeError: ‘_IncompatibleKeys’ object is not callable 在加载模型后对模型进行其他操作时会出现此类错误,这是错误的加载方式导致的,举例如下: #错误的方式: model = model.load_state_dict(torch.load(PATH)) model.eval() #正确的方式: model.load_state_dict(torch.load(PATH)) model.eval() 很尴尬的一类错误