Thank you so much for your last response!! The data could be accessed, while in the training phase, I meet another problem, could you tell me how may I fix it?
Epoch 0/24

RuntimeError                              Traceback (most recent call last)
 in 
1 model_ft = train_model(model_ft, criterion, optimizer_ft, exp_lr_scheduler,
----> 2                        num_epochs=25)
 in train_model(model, criterion, optimizer, scheduler, num_epochs)
36                     # backward + optimize only if in training phase
37                     if phase == ‘train’:
—> 38                         loss.backward()
39                         optimizer.step()
40
~\anaconda3\Lib\site-packages\torch\tensor.py in backward(self, gradient, retain_graph, create_graph)
183                 products. Defaults to False.
184         “”"
–> 185         torch.autograd.backward(self, gradient, retain_graph, create_graph)
186
187     def register_hook(self, hook):
~\anaconda3\Lib\site-packages\torch\autograd_init_.py in backward(tensors, grad_tensors, retain_graph, create_graph, grad_variables)
125     Variable._execution_engine.run_backward(
126         tensors, grad_tensors, retain_graph, create_graph,
–> 127         allow_unreachable=True)  # allow_unreachable flag
128
129
RuntimeError: CUDA error: CUBLAS_STATUS_ALLOC_FAILED when calling cublasCreate(handle)
Exception raised from createCublasHandle at …\aten\src\ATen\cuda\CublasHandlePool.cpp:8 (most recent call first):
00007FFB63A875A200007FFB63A87540 c10.dll!c10::Error::Error [ @ ]
00007FFAFF31AEA800007FFAFF319E70 torch_cuda.dll!at::cuda::getCurrentCUDASparseHandle [ @ ]
00007FFAFF31A7D800007FFAFF319E70 torch_cuda.dll!at::cuda::getCurrentCUDASparseHandle [ @ ]
00007FFAFF31B66700007FFAFF31B1A0 torch_cuda.dll!at::cuda::getCurrentCUDABlasHandle [ @ ]
00007FFAFF31B24700007FFAFF31B1A0 torch_cuda.dll!at::cuda::getCurrentCUDABlasHandle [ @ ]
00007FFAFF31320700007FFAFF3124B0 torch_cuda.dll!at::native::sparse_mask_cuda [ @ ]
00007FFAFE81CA9700007FFAFE81B990 torch_cuda.dll!at::native::lerp_cuda_tensor_out [ @ ]
00007FFAFE81E4D200007FFAFE81DF60 torch_cuda.dll!at::native::addmm_out_cuda [ @ ]
00007FFAFE81F64300007FFAFE81F560 torch_cuda.dll!at::native::mm_cuda [ @ ]
00007FFAFF381B0F00007FFAFF31E0A0 torch_cuda.dll!at::native::set_storage_cuda_ [ @ ]
00007FFAFF371B2200007FFAFF31E0A0 torch_cuda.dll!at::native::set_storage_cuda_ [ @ ]
00007FFB2969D94900007FFB29698FA0 torch_cpu.dll!at::bucketize_out [ @ ]
00007FFB296D057700007FFB296D0520 torch_cpu.dll!at::mm [ @ ]
00007FFB2AA2EC7900007FFB2A93E010 torch_cpu.dll!torch::autograd::GraphRoot::apply [ @ ]
00007FFB291E715700007FFB291E6290 torch_cpu.dll!at::indexing::TensorIndex::boolean [ @ ]
00007FFB2969D94900007FFB29698FA0 torch_cpu.dll!at::bucketize_out [ @ ]
00007FFB297B210700007FFB297B20B0 torch_cpu.dll!at::Tensor::mm [ @ ]
00007FFB2A8CB71100007FFB2A8CA760 torch_cpu.dll!torch::autograd::profiler::Event::kind [ @ ]
00007FFB2A8816D800007FFB2A881580 torch_cpu.dll!torch::autograd::generated::AddmmBackward::apply [ @ ]
00007FFB2A877E9100007FFB2A877B50 torch_cpu.dll!torch::autograd::Node::operator() [ @ ]
00007FFB2ADDF9BA00007FFB2ADDF300 torch_cpu.dll!torch::autograd::Engine::add_thread_pool_task [ @ ]
00007FFB2ADE03AD00007FFB2ADDFFD0 torch_cpu.dll!torch::autograd::Engine::evaluate_function [ @ ]
00007FFB2ADE4FE200007FFB2ADE4CA0 torch_cpu.dll!torch::autograd::Engine::thread_main [ @ ]
00007FFB2ADE4C4100007FFB2ADE4BC0 torch_cpu.dll!torch::autograd::Engine::thread_init [ @ ]
00007FFB4A0E0A7700007FFB4A0BA150 torch_python.dll!THPShortStorage_New [ @ ]
00007FFB2ADDBF1400007FFB2ADDB780 torch_cpu.dll!torch::autograd::Engine::get_base_engine [ @ ]
00007FFB9E6B0E8200007FFB9E6B0D40 ucrtbase.dll!beginthreadex [ @ ]
00007FFBA0967BD400007FFBA0967BC0 KERNEL32.DLL!BaseThreadInitThunk [ @ ]
00007FFBA15CCE5100007FFBA15CCE30 ntdll.dll!RtlUserThreadStart [ @ ]