"tests/git@developer.sourcefind.cn:OpenDAS/mmcv.git" did not exist on "50c255bc2d3feac171bbee4bc68fcd4641a8b68a"
Unverified Commit 040658b7 authored by ChaimZhu's avatar ChaimZhu Committed by GitHub
Browse files

[Fix] Fix features variable may be None in points sampler (#2234)

parent cdfbdc0b
...@@ -102,7 +102,7 @@ class PointsSampler(nn.Module): ...@@ -102,7 +102,7 @@ class PointsSampler(nn.Module):
""" """
if points_xyz.dtype == torch.half: if points_xyz.dtype == torch.half:
points_xyz = points_xyz.to(torch.float32) points_xyz = points_xyz.to(torch.float32)
if features.dtype == torch.half: if features is not None and features.dtype == torch.half:
features = features.to(torch.float32) features = features.to(torch.float32)
indices = [] indices = []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment