我正在使用Imagenet数据集训练Resnet模型。我已经在Cifar10上测试了代码。但是当我训练Imagenet模型时,会得到以下结果。我正在使用的代码来自此github存储库https://github.com/itayhubara/BinaryNet.pytorch。我已经从kaggle下载了部分数据集,其中包含用于训练的45000张图像和用于验证的5000张图像。您能否让我知道是什么原因导致模型在第一个纪元本身损失0.00和精度100。
我的数据路径如下:
'imagenet': {
'train': os.path.join(_DATASETS_MAIN_PATH, 'ImageNet_train/train/'),
'val': os.path.join(_DATASETS_MAIN_PATH, 'ImageNet_val/val/')
}
2020-03-24 22:01:41 - INFO - saving to ./results/2020-03-24_22-01-41
2020-03-24 22:01:41 - DEBUG - run arguments: Namespace(batch_size=256, dataset='imagenet', epochs=1, evaluate=None, gpus='0', input_size=None, lr=0.1, model='resnet', model_config='', momentum=0.9, optimizer='SGD', print_freq=10, results_dir='./results', resume='', save='2020-03-24_22-01-41', start_epoch=0, type='torch.FloatTensor', weight_decay=0.0001, workers=8)
2020-03-24 22:01:41 - INFO - creating model resnet
2020-03-24 22:01:41 - INFO - created model with configuration: {'input_size': None, 'dataset': 'imagenet'}
2020-03-24 22:01:41 - INFO - number of parameters: 11689512
2020-03-24 22:01:41 - INFO - training regime: {0: {'optimizer': 'SGD', 'lr': 0.1, 'weight_decay': 0.0001, 'momentum': 0.9}, 30: {'lr': 0.01}, 60: {'lr': 0.001, 'weight_decay': 0}, 90: {'lr': 0.0001}}
2020-03-24 22:01:41 - DEBUG - OPTIMIZER - setting method = SGD
2020-03-24 22:01:41 - DEBUG - OPTIMIZER - setting lr = 0.1
2020-03-24 22:01:41 - DEBUG - OPTIMIZER - setting momentum = 0.9
2020-03-24 22:01:41 - DEBUG - OPTIMIZER - setting weight_decay = 0.0001
2020-03-24 22:02:42 - INFO - TRAINING - Epoch: [0][0/176] Time 60.407 (60.407) Data 2.412 (2.412) Loss 7.3534 (7.3534) Prec@1 0.000 (0.000) Prec@5 0.000 (0.000)
2020-03-24 23:00:06 - INFO - TRAINING - Epoch: [0][10/176] Time 53.330 (318.611) Data 0.000 (0.221) Loss 0.0000 (0.6685) Prec@1 100.000 (90.909) Prec@5 100.000 (90.909)
2020-03-24 23:08:36 - INFO - TRAINING - Epoch: [0][20/176] Time 50.158 (191.196) Data 0.005 (0.117) Loss 0.0000 (0.3502) Prec@1 100.000 (95.238) Prec@5 100.000 (95.238)
2020-03-24 23:16:50 - INFO - TRAINING - Epoch: [0][30/176] Time 49.597 (145.459) Data 0.000 (0.080) Loss 0.0000 (0.2372) Prec@1 100.000 (96.774) Prec@5 100.000 (96.774)
2020-03-24 23:25:08 - INFO - TRAINING - Epoch: [0][40/176] Time 49.339 (122.113) Data 0.002 (0.060) Loss 0.0000 (0.1794) Prec@1 100.000 (97.561) Prec@5 100.000 (97.561)
2020-03-24 23:33:24 - INFO - TRAINING - Epoch: [0][50/176] Time 49.521 (107.901) Data 0.000 (0.049) Loss 0.0000 (0.1442) Prec@1 100.000 (98.039) Prec@5 100.000 (98.039)
2020-03-24 23:41:39 - INFO - TRAINING - Epoch: [0][60/176] Time 49.584 (98.325) Data 0.001 (0.041) Loss 0.0000 (0.1205) Prec@1 100.000 (98.361) Prec@5 100.000 (98.361)
2020-03-24 23:49:54 - INFO - TRAINING - Epoch: [0][70/176] Time 49.681 (91.450) Data 0.002 (0.036) Loss 0.0000 (0.1036) Prec@1 100.000 (98.592) Prec@5 100.000 (98.592)
2020-03-24 23:58:09 - INFO - TRAINING - Epoch: [0][80/176] Time 49.565 (86.268) Data 0.000 (0.031) Loss 0.0000 (0.0908) Prec@1 100.000 (98.765) Prec@5 100.000 (98.765)
2020-03-25 00:06:24 - INFO - TRAINING - Epoch: [0][90/176] Time 49.301 (82.228) Data 0.000 (0.028) Loss 0.0000 (0.0808) Prec@1 100.000 (98.901) Prec@5 100.000 (98.901)
2020-03-25 00:14:38 - INFO - TRAINING - Epoch: [0][100/176] Time 49.637 (78.974) Data 0.000 (0.025) Loss 0.0000 (0.0728) Prec@1 100.000 (99.010) Prec@5 100.000 (99.010)
2020-03-25 00:22:50 - INFO - TRAINING - Epoch: [0][110/176] Time 49.199 (76.294) Data 0.000 (0.023) Loss 0.0000 (0.0662) Prec@1 100.000 (99.099) Prec@5 100.000 (99.099)
2020-03-25 00:31:02 - INFO - TRAINING - Epoch: [0][120/176] Time 49.163 (74.060) Data 0.000 (0.021) Loss 0.0000 (0.0608) Prec@1 100.000 (99.174) Prec@5 100.000 (99.174)
2020-03-25 00:39:15 - INFO - TRAINING - Epoch: [0][130/176] Time 49.635 (72.167) Data 0.000 (0.020) Loss 0.0000 (0.0561) Prec@1 100.000 (99.237) Prec@5 100.000 (99.237)
2020-03-25 00:47:27 - INFO - TRAINING - Epoch: [0][140/176] Time 49.162 (70.541) Data 0.000 (0.018) Loss 0.0000 (0.0522) Prec@1 100.000 (99.291) Prec@5 100.000 (99.291)
2020-03-25 00:55:44 - INFO - TRAINING - Epoch: [0][150/176] Time 49.148 (69.155) Data 0.000 (0.017) Loss 0.0000 (0.0487) Prec@1 100.000 (99.338) Prec@5 100.000 (99.338)
2020-03-25 01:03:53 - INFO - TRAINING - Epoch: [0][160/176] Time 48.701 (67.901) Data 0.000 (0.016) Loss 0.0000 (0.0457) Prec@1 100.000 (99.379) Prec@5 100.000 (99.379)
2020-03-25 01:11:59 - INFO - TRAINING - Epoch: [0][170/176] Time 48.749 (66.773) Data 0.000 (0.015) Loss 0.0000 (0.0430) Prec@1 100.000 (99.415) Prec@5 100.000 (99.415)
2020-03-25 01:16:12 - INFO - EVALUATING - Epoch: [0][0/20] Time 20.459 (20.459) Data 2.522 (2.522) Loss 0.0000 (0.0000) Prec@1 100.000 (100.000) Prec@5 100.000 (100.000)
2020-03-25 01:18:45 - INFO - EVALUATING - Epoch: [0][10/20] Time 14.844 (15.801) Data 0.007 (0.232) Loss 0.0000 (0.0000) Prec@1 100.000 (100.000) Prec@5 100.000 (100.000)
2020-03-25 01:20:54 - INFO -
Epoch: 1 Training Loss 0.0418 Training Prec@1 99.431 Training Prec@5 99.431 Validation Loss 0.0000 Validation Prec@1 100.000 Validation Prec@5 100.000