The following problems when running face recognition code Cosface, this how to solve! Just started to learn, seek answers,
"D: \ \ Program Files \ Anaconda \ envs \ pytorch \ python exe" F:/Python_code/CosFace/CosFace_pytorch - master/main. Py
Namespace (batch_size=512, classifier_type='MCP', cuda=False, database='LFW', epochs=30, is_gray=False, log_interval=100, lr=0.1, momentum=0.9, the network='sphere20', no_cuda=False, num_class=10752, root_path=', save_path='checkpoint/' step_size=[16000, 24000], train_list=' the dataset/cleaned_list. TXT ', weight_decay=0.0005, workers=4)
DataParallel (
(module) : sphere (
(layer1) : Sequential (
(0) : Conv2d (3, 64, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))
(1) : PReLU (num_parameters=64)
(2) : Block (
(conv1) : Conv2d (64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias,=False)
(prelu1) : PReLU (num_parameters=64)
(conv2) : Conv2d (64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias,=False)
(prelu2) : PReLU (num_parameters=64)
)
)
(layer2) : Sequential (
(0) : Conv2d (64, 128, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))
(1) : PReLU (num_parameters=128)
(2) : Block (
(conv1) : Conv2d (128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias,=False)
(prelu1) : PReLU (num_parameters=128)
(conv2) : Conv2d (128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias,=False)
(prelu2) : PReLU (num_parameters=128)
)
(3) : Block (
(conv1) : Conv2d (128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias,=False)
(prelu1) : PReLU (num_parameters=128)
(conv2) : Conv2d (128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias,=False)
(prelu2) : PReLU (num_parameters=128)
)
)
(layer3) : Sequential (
(0) : Conv2d (128, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))
(1) : PReLU (num_parameters=256)
(2) : Block (
(conv1) : Conv2d (256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias,=False)
(prelu1) : PReLU (num_parameters=256)
(conv2) : Conv2d (256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias,=False)
(prelu2) : PReLU (num_parameters=256)
)
(3) : Block (
(conv1) : Conv2d (256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias,=False)
(prelu1) : PReLU (num_parameters=256)
(conv2) : Conv2d (256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias,=False)
(prelu2) : PReLU (num_parameters=256)
)
(4) : Block (
(conv1) : Conv2d (256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias,=False)
(prelu1) : PReLU (num_parameters=256)
(conv2) : Conv2d (256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias,=False)
(prelu2) : PReLU (num_parameters=256)
)
(5) : Block (
(conv1) : Conv2d (256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias,=False)
(prelu1) : PReLU (num_parameters=256)
(conv2) : Conv2d (256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias,=False)
(prelu2) : PReLU (num_parameters=256)
)
)
(layer4) : Sequential (
(0) : Conv2d (256, 512, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))
(1) : PReLU (num_parameters=512)
(2) : Block (
(conv1) : Conv2d (512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias,=False)
(prelu1) : PReLU (num_parameters=512)
(conv2) : Conv2d (512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias,=False)
(prelu2) : PReLU (num_parameters=512)
)
)
(fc) : Linear (in_features=21504, out_features=512, bias,=True)
)
)
The length of train Database: 455594
Number of Identities: 10752
The 2020-08-27 19:27:30 Epoch 1 start training
Always load image 0000212\086. JPG
Always load image 0115010\004. JPG
Always load image 0597223\005. JPG
Always load image 0004909\022. JPG
Always load image 0842770\101. JPG
Always load image 0829576\251. JPG
Always load image 0004051\035. JPG
Always load image 2315497\008. JPG
Always load image 0068338\514. JPG
Traceback (the most recent call last) :
The File "F:/Python_code/CosFace/CosFace_pytorch - master/main. Py", line 248, in & lt; module>
The main ()
The File "F:/Python_code/CosFace/CosFace_pytorch - master/main. Py", line 169, the main in
"Train" (train_loader, model, classifier, criterion, optimizer, epoch)
The File "F:/Python_code/CosFace/CosFace_pytorch - master/main. Py", line 185, in "train"
For batch_idx, (data, target) in enumerate (train_loader, 1) :
The File "D: \ \ Program Files \ Anaconda \ envs \ pytorch \ lib \ site - packages, torch, utils \ data \ dataloader py", line 363, in __next__
Data=(https://bbs.csdn.net/topics/self._next_data)
The File "D: \ \ Program Files \ Anaconda \ envs \ pytorch \ lib \ site - packages, torch, utils \ data \ dataloader py", line 989, in _next_data
Return the self. _process_data (data)
The File "D: \ \ Program Files \ Anaconda \ envs \ pytorch \ lib \ site - packages, torch, utils \ data \ dataloader py", line 1014, in _process_data
Data. Reraise ()
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull