在使用jittor的JGAN框架过程中,出现了vgg19模型和cuda的错误:
Traceback (most recent call last):
File “spade_train.py”, line 35, in
trainer = Pix2PixTrainer(opt)
File “/root/JGAN/models/gaugan/pix2pix_trainer.py”, line 18, in init
self.pix2pix_model = Pix2PixModel(opt)
File “/root/JGAN/models/gaugan/models/pix2pix_model.py”, line 35, in init
self.criterionVGG = networks.VGGLoss(self.opt.gpu_ids)
File “/root/JGAN/models/gaugan/models/networks/loss.py”, line 107, in init
self.vgg = VGG19()
File “/root/JGAN/models/gaugan/models/networks/architecture.py”, line 97, in init
vgg_pretrained_features = models.vgg19(pretrained=True).features
File “/root/miniconda3/envs/jy/lib/python3.7/site-packages/jittor/models/vgg.py”, line 109, in vgg19
if pretrained: model.load(“jittorhub://vgg19.pkl”)
File “/root/miniconda3/envs/jy/lib/python3.7/site-packages/jittor/init.py”, line 1575, in load
self.load_parameters(load(path))
File “/root/miniconda3/envs/jy/lib/python3.7/site-packages/jittor/init.py”, line 1506, in load_parameters
param = array(params[key])
File “/root/miniconda3/envs/jy/lib/python3.7/site-packages/jittor/init.py”, line 376, in array
ret = ops.array(data)
RuntimeError: Wrong inputs arguments, Please refer to examples(help(jt.ops.array)).
Types of your inputs are:
self = module,
args = (ndarray, ),
The function declarations are:
VarHolder* array__(PyObject* obj)
Failed reason:[f 1214 12:43:37.779185 96 helper_cuda.h:128] CUDA error at /root/miniconda3/envs/jy/lib/python3.7/site-packages/jittor/src/mem/allocator/cuda_host_allocator.cc:22 code=2( cudaErrorMemoryAllocation ) cudaMallocHost(&ptr, size)