调用Spatialsamplerbillinear函数显示未实现的错误

时间:2019-07-06 19:57:13

标签: pytorch google-colaboratory

我正在研究Google Colab。代码中有一个对Spatialsamplerbillinear函数的调用,该函数假定为spacesamplingbilinear.cu,并且显示未实现的错误

错误:

/content/drive/My Drive/sushanm1/sconv/functional/sconv.py in kernel_resampling_forward(kernel, grid)   backend.SpatialGridSamplerBilinear_updateOutput(backend.library_state, kernel, grid, output, 0)
 /usr/local/lib/python3.6/dist-packages/torch/_thnn/utils.py in __getattr__(self, name)
     25     def register_method(self, name, ctypes_fn):
     26         self.methods[name] = ctypes_fn
---> 27 
     28     @property
     29     def library_state(self):

我尝试在colab上设置cuda(),当我在研究实验室的系统上进行设置时,它显示了此功能作为.cu文件的存在 我也尝试升级到pytorch 0.3.1,但仍然显示未实现。我不知道为什么在colab上未调用thcunn实现

代码:

 backend = thnn.type2backend[kernel.type()]
  backend.SpatialGridSamplerBilinear_updateOutput(backend.library_state, 
  kernel, grid, output, 0)
  return output

0 个答案:

没有答案