Closed YBIO closed 4 years ago
The --pi is a hyperparameter, which needs to be True. Do you modify any code in the script? This seems like the wrong format bug...
The --pi is a hyperparameter, which needs to be True. Do you modify any code in the script? This seems like the wrong format bug...
Thanks for your kind reply~ I found the error, I annotated --student-pretrain-model-imgnet
when running run_train_val.sh
. Thanks again~ღ
Hi~Your work is very impressing. Sadly, I am stuck when trying to run the code, could you please help me? When I try to run the run_train_val.sh, it ends up of failure as:
Traceback (most recent call last): File "train_and_eval.py", line 25, in
model.optimize_parameters()
File "/home/yb/code/Distillation/structure_kd/networks/kd_model.py", line 168, in optimize_parameters
self.forward()
File "/home/yb/code/Distillation/structure_kd/networks/kd_model.py", line 122, in forward
self.preds_T = self.parallel_teacher.eval()(self.images, parallel=args.parallel)
File "/home/yb/anaconda3/envs/pt041/lib/python3.5/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(input, kwargs)
File "/home/yb/code/Distillation/structure_kd/utils/parallel.py", line 106, in forward
return super().forward(inputs, kwargs)
File "/home/yb/anaconda3/envs/pt041/lib/python3.5/site-packages/torch/nn/parallel/data_parallel.py", line 121, in forward
return self.module(inputs[0], kwargs[0])
File "/home/yb/anaconda3/envs/pt041/lib/python3.5/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, *kwargs)
File "/home/yb/code/Distillation/structure_kd/networks/pspnet_combine.py", line 177, in forward
x = self.relu1(self.bn1(self.conv1(x)))
File "/home/yb/anaconda3/envs/pt041/lib/python3.5/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(input, kwargs)
File "/home/yb/code/Distillation/structure_kd/libs/bn.py", line 184, in forward
self.activation, self.slope)
File "/home/yb/code/Distillation/structure_kd/libs/functions.py", line 218, in forward
x, x, ctx.eps)
File "/home/yb/code/Distillation/structure_kd/libs/functions.py", line 16, in _check
raise RuntimeError("CUDA Error encountered in {}".format(fn))
RuntimeError: CUDA Error encountered in <function CompiledLib.bn_forward_cuda at 0x7f270938d620>
run_train_val.sh: 19: run_train_val.sh: --pi: not found
I don't know how to fix it, would you kindly take a look? Thank you sooooo much~ By the way, my environment is PyTorch 0.4.1, python 3.5.6 and CUDA 9.0.