[CVPR 2022] Pytorch implementation of "Templates for 3D Object Pose Estimation Revisited: Generalization to New objects and Robustness to Occlusions" paper
Following all versions you suggestion + installing Jupyter Lab for running the colab notebook locally on my machine, I get this error:
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[8], line 2
1 with torch.no_grad():
----> 2 feat_query = model(query_tensor.to(device))
4 # get template features by batch
5 batch_size = 8
File ~/anaconda3/envs/template/lib/python3.8/site-packages/torch/nn/modules/module.py:1051, in Module._call_impl(self, *input, **kwargs)
1047 # If we don't have any hooks, we want to skip the rest of the logic in
1048 # this function, and just call forward.
1049 if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
1050 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1051 return forward_call(*input, **kwargs)
1052 # Do not call functions when jit is used
1053 full_backward_hooks, non_full_backward_hooks = [], []
File ~/template-pose/src/model/network.py:60, in FeatureExtractor.forward(self, x)
59 def forward(self, x):
---> 60 feat = self.backbone(x)
61 feat = self.projector(feat)
62 # feat = F.normalize(feat, dim=1)
File ~/anaconda3/envs/template/lib/python3.8/site-packages/torch/nn/modules/module.py:1051, in Module._call_impl(self, *input, **kwargs)
1047 # If we don't have any hooks, we want to skip the rest of the logic in
1048 # this function, and just call forward.
1049 if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
1050 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1051 return forward_call(*input, **kwargs)
1052 # Do not call functions when jit is used
1053 full_backward_hooks, non_full_backward_hooks = [], []
File ~/template-pose/src/model/resnet.py:137, in ResNet.forward(self, x)
135 def forward(self, x):
136 out = self.conv1(x)
--> 137 out = self.bn1(out)
138 out = self.relu(out)
139 if self.use_avg_pooling_and_fc:
File ~/anaconda3/envs/template/lib/python3.8/site-packages/torch/nn/modules/module.py:1051, in Module._call_impl(self, *input, **kwargs)
1047 # If we don't have any hooks, we want to skip the rest of the logic in
1048 # this function, and just call forward.
1049 if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
1050 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1051 return forward_call(*input, **kwargs)
1052 # Do not call functions when jit is used
1053 full_backward_hooks, non_full_backward_hooks = [], []
File ~/anaconda3/envs/template/lib/python3.8/site-packages/torch/nn/modules/batchnorm.py:147, in _BatchNorm.forward(self, input)
144 if self.training and self.track_running_stats:
145 # TODO: if statement only here to tell the jit to skip emitting this when it is None
146 if self.num_batches_tracked is not None: # type: ignore[has-type]
--> 147 self.num_batches_tracked = self.num_batches_tracked + 1 # type: ignore[has-type]
148 if self.momentum is None: # use cumulative moving average
149 exponential_average_factor = 1.0 / float(self.num_batches_tracked)
RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Following all versions you suggestion + installing Jupyter Lab for running the colab notebook locally on my machine, I get this error:
for this block of code:
I restarted the machine and I still have the same problem