排序函数python:问题:RuntimeError:张量a(0)的大小必须匹配张量b(5)的大小在非单例维度2

我正在训练视频超分辨率模型(DavSR),当我训练模型时,出现错误,以下是错误代码。

    1.this is that error:  

 
  File "/home3/HWGroup/wangcy/.conda/envs/davsr-pytorch/lib/python3.8/site-packages/mmcv/runner/base_runner.py", line 317, in call_hook
    getattr(hook, fn_name)(self)
  File "/home3/HWGroup/wangcy/JunLyu/zxk/old_/mmediting/mmedit/core/evaluation/eval_hooks.py", line 42, in after_train_iter
    results = single_gpu_test(
  File "/home3/HWGroup/wangcy/JunLyu/zxk/old_/mmediting/mmedit/a/test.py", line 43, in single_gpu_test
    result = model(
  File "/home3/HWGroup/wangcy/.conda/envs/davsr-pytorch/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home3/HWGroup/wangcy/.conda/envs/davsr-pytorch/lib/python3.8/site-packages/mmcv/parallel/data_parallel.py", line 51, in forward
    return super().forward(*inputs, **kwargs)
  File "/home3/HWGroup/wangcy/.conda/envs/davsr-pytorch/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 166, in forward
    return self.module(*inputs[0], **kwargs[0])
  File "/home3/HWGroup/wangcy/.conda/envs/davsr-pytorch/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home3/HWGroup/wangcy/.conda/envs/davsr-pytorch/lib/python3.8/site-packages/mmcv/runner/fp16_utils.py", line 116, in new_func
    return old_func(*args, **kwargs)
  File "/home3/HWGroup/wangcy/JunLyu/zxk/old_/mmediting/mmedit/models/restorers/basic_restorer.py", line 75, in forward
    return self.forward_test(lq, gt, **kwargs)
  File "/home3/HWGroup/wangcy/JunLyu/zxk/old_/DSR-1.0.0/davsr/models/restorers/davsr_model.py", line 185, in forward_test
    output_i = self.generator(lq_clip).cpu()
  File "/home3/HWGroup/wangcy/.conda/envs/davsr-pytorch/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home3/HWGroup/wangcy/JunLyu/zxk/old_/DSR-1.0.0/davsr/models/backbones/sr_backbones/davsr_net.py", line 990, in forward
    FB = ps2ot(k, (sf[0]*t, sf[1]*w, sf[2]*h))#FB是光学传递函数的输出                              # [1, 1, 100, 256, 256]
  File "/home3/HWGroup/wangcy/JunLyu/zxk/old_/DSR-1.0.0/davsr/models/backbones/sr_backbones/davsr_net.py", line 551, in ps2ot
    otf[:, :, :psf.shape[2], :psf.shape[3], :psf.shape[4]].copy_(psf)   # [1, 1, 100, 256, 256]
RuntimeError: The size of tensor a (0) must match the size of tensor b (5) at non-singleton dimension 2

本站系公益性非盈利分享网址,本文来自用户投稿,不代表边看边学立场,如若转载,请注明出处

(289)
1/cosx求导:通过对一系列求和来计算 cos(x)(cosx times cosx)
上一篇
Vocal oid 3:X509证书内的长 OID问题(oid)
下一篇

相关推荐

发表评论

登录 后才能评论

评论列表(40条)