|
PLAI and CUDA
发表于 2020-2-26 20:27:02
浏览:5116
|
回复:1
打印
只看该作者
[复制链接]
楼主
I train my network using PLAI and CUDA.
On final stage of Model Conversion I get the following error:
python3.6 ./PLAI.py
self.num_classes 2
self.mask_bits 3,3,1,1,1
==> Preparing data..
Training and validation data exist already
==> Building model from scratch..
Epoch: 0
[================================================================>] Step: 2s260ms | 66/66 s235ms | Loss: nan | Acc: 59.542% (312/524)20.000 | Acc: 52.143% (146/280)
[===========================================================>.....] Step: 38 12/12 t: 428ms | Loss: nan | Acc: 62.500% (15/24))
Saving..
* Saved checkpoint to ./checkpoint/gti_2801_gnet1.t7
==> Slicing network..
==> Absorbing batch normalization..
Traceback (most recent call last):
File "./PLAI.py", line 150, in <module>
gtiPLAI.gtiModelConversion()
File "./PLAI.py", line 119, in gtiModelConversion
modelConversion(self.model_type, self.module_type, self.mask_bits, self.checkpoint_dir, self.checkpoint, filter_out , bias_out, fc_out)
File "/home/roland/_PLAI/modelConversion.py", line 543, in modelConversion
netSurgeryDumpType1(arch, checkpoint_mid, filter_out, bias_out, fc_out)
File "/home/roland/_PLAI/modelConversion.py", line 134, in netSurgeryDumpType1
quant_gain = np.concatenate((quant_gain, np.array(quant.data)), axis=0)
File "/home/roland/.local/lib/python3.6/site-packages/torch/tensor.py", line 486, in __array__
return self.numpy()
TypeError: can't convert CUDA tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.
|
|