Firefly开源社区

打印 上一主题 下一主题

PLAI and CUDA

16

积分

0

威望

0

贡献

技术小白

积分
16

PLAI and CUDA

发表于 2020-2-26 20:27:02      浏览:5219 | 回复: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.

回复

使用道具 举报

572

积分

1

威望

0

贡献

社区版主

Rank: 7Rank: 7Rank: 7

积分
572
发表于 2020-2-29 14:37:33        只看该作者  沙发
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表