Firefly开源社区

标题: PLAI and CUDA [打印本页]

作者: RolandZar    时间: 2020-2-26 20:27
标题: PLAI and CUDA
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.


作者: rany    时间: 2020-2-29 14:37
This link may help you: http://wiki.t-firefly.com/en/NCC ... o-host-memory-first




欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/) Powered by Discuz! X3.1