Dear professor, when I was training, I did not modify the parameters of the original program, but I encountered the following problems, may I ask if you encountered similar problems in the training process, looking forward to your reply.
Data dir: /root/autodl-tmp/skeleton-dml/data//ntu/ntu_reindex/one_shot
final_train
Trainset: 94910 Testset: 18963 Samplesset: 20
NTU_ONE_SHOT_REINDEX_model_resnet18_cl_cross_entropy_ml_triplet_margin_miner_multi_similarity_mix_ml_0.50_mix_cl_0.50_resize_256_emb_size_128_class_size_21_opt_rmsprop_lr0.00
[2023-09-13 10:17:00,350][root][INFO] - Initializing dataloader
[2023-09-13 10:17:00,350][root][INFO] - Initializing dataloader iterator
[2023-09-13 10:17:02,035][root][INFO] - Done creating dataloader iterator
[2023-09-13 10:17:02,037][root][INFO] - TRAINING EPOCH 1
0%| | 0/2962 [00:07<?, ?it/s]
Traceback (most recent call last):
File "train.py", line 349, in
train_app()
File "/root/miniconda3/lib/python3.8/site-packages/hydra/main.py", line 20, in decorated_main
run_hydra(
File "/root/miniconda3/lib/python3.8/site-packages/hydra/_internal/utils.py", line 171, in run_hydra
hydra.run(
File "/root/miniconda3/lib/python3.8/site-packages/hydra/_internal/hydra.py", line 82, in run
return run_job(
File "/root/miniconda3/lib/python3.8/site-packages/hydra/plugins/common/utils.py", line 109, in run_job
ret.return_value = task_function(task_cfg)
File "train.py", line 344, in train_app
trainer.train(num_epochs=num_epochs)
File "/root/miniconda3/lib/python3.8/site-packages/pytorch_metric_learning/trainers/base_trainer.py", line 83, in train
self.forward_and_backward()
File "/root/miniconda3/lib/python3.8/site-packages/pytorch_metric_learning/trainers/base_trainer.py", line 110, in forward_and_backward
self.calculate_loss(self.get_batch())
File "/root/miniconda3/lib/python3.8/site-packages/pytorch_metric_learning/trainers/train_with_classifier.py", line 13, in calculate_loss
self.losses["classifier_loss"] = self.maybe_get_classifier_loss(logits, labels)
File "/root/miniconda3/lib/python3.8/site-packages/pytorch_metric_learning/trainers/train_with_classifier.py", line 17, in maybe_get_classifier_loss
return self.loss_funcs["classifier_loss"](logits, labels.to(logits.device))
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/loss.py", line 931, in forward
return F.cross_entropy(input, target, weight=self.weight,
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/functional.py", line 2317, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/functional.py", line 2115, in nll_loss
ret = torch._C._nn.nll_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
IndexError: Target 83 is out of bounds.
Dear professor, when I was training, I did not modify the parameters of the original program, but I encountered the following problems, may I ask if you encountered similar problems in the training process, looking forward to your reply. Data dir: /root/autodl-tmp/skeleton-dml/data//ntu/ntu_reindex/one_shot final_train Trainset: 94910 Testset: 18963 Samplesset: 20 NTU_ONE_SHOT_REINDEX_model_resnet18_cl_cross_entropy_ml_triplet_margin_miner_multi_similarity_mix_ml_0.50_mix_cl_0.50_resize_256_emb_size_128_class_size_21_opt_rmsprop_lr0.00 [2023-09-13 10:17:00,350][root][INFO] - Initializing dataloader [2023-09-13 10:17:00,350][root][INFO] - Initializing dataloader iterator [2023-09-13 10:17:02,035][root][INFO] - Done creating dataloader iterator [2023-09-13 10:17:02,037][root][INFO] - TRAINING EPOCH 1 0%| | 0/2962 [00:07<?, ?it/s] Traceback (most recent call last): File "train.py", line 349, in
train_app()
File "/root/miniconda3/lib/python3.8/site-packages/hydra/main.py", line 20, in decorated_main
run_hydra(
File "/root/miniconda3/lib/python3.8/site-packages/hydra/_internal/utils.py", line 171, in run_hydra
hydra.run(
File "/root/miniconda3/lib/python3.8/site-packages/hydra/_internal/hydra.py", line 82, in run
return run_job(
File "/root/miniconda3/lib/python3.8/site-packages/hydra/plugins/common/utils.py", line 109, in run_job
ret.return_value = task_function(task_cfg)
File "train.py", line 344, in train_app
trainer.train(num_epochs=num_epochs)
File "/root/miniconda3/lib/python3.8/site-packages/pytorch_metric_learning/trainers/base_trainer.py", line 83, in train
self.forward_and_backward()
File "/root/miniconda3/lib/python3.8/site-packages/pytorch_metric_learning/trainers/base_trainer.py", line 110, in forward_and_backward
self.calculate_loss(self.get_batch())
File "/root/miniconda3/lib/python3.8/site-packages/pytorch_metric_learning/trainers/train_with_classifier.py", line 13, in calculate_loss
self.losses["classifier_loss"] = self.maybe_get_classifier_loss(logits, labels)
File "/root/miniconda3/lib/python3.8/site-packages/pytorch_metric_learning/trainers/train_with_classifier.py", line 17, in maybe_get_classifier_loss
return self.loss_funcs["classifier_loss"](logits, labels.to(logits.device))
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/loss.py", line 931, in forward
return F.cross_entropy(input, target, weight=self.weight,
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/functional.py", line 2317, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/functional.py", line 2115, in nll_loss
ret = torch._C._nn.nll_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
IndexError: Target 83 is out of bounds.