easezyc / deep-transfer-learning

A collection of implementations of deep domain adaptation algorithms
MIT License
889 stars 205 forks source link

question about dsan #18

Closed AllenLiang96 closed 3 years ago

AllenLiang96 commented 3 years ago

您好,我在运行您提供代码的过程中,由于机器本身的限制(1060 6GB),所以我将batch_size从32改到了16 batch_size = 16 epochs = 200 lr = 0.01 momentum = 0.9 no_cuda =False cuda_id = '0' seed = 1 log_interval = 10 l2_decay = 5e-4 class_num = 31 param = 0.3 bottle_neck = True root_path = "G:/数据集/datasets/" source_name = "amazon" target_name = "dslr"

除了batch_size之外所有的参数没有进行更改,但是模型的准确率一直是100%,请问这是哪里出现了问题。

以及当我试图将backbone模型从resnet50改成resnet18或者34的时候一直会出现问题,RuntimeError: Error(s) in loading state_dict for ResNet: Missing key(s) in state_dict: "layer1.0.conv3.weight", "layer1.0.bn3.weight", "layer1.0.bn3.bias", "layer1.0.bn3.running_mean", "layer1.0.bn3.running_var", "layer1.0.downsample.0.weight", "layer1.0.downsample.1.weight", "layer1.0.downsample.1.bias", "layer1.0.downsample.1.running_mean",这里是报错信息的部份,请问我要如何进行修改。

easezyc commented 3 years ago

refer to https://github.com/easezyc/deep-transfer-learning/issues/4