"git@developer.sourcefind.cn:OpenDAS/Uni-Core.git" did not exist on "d1dc264d163d0e1ebf4c62f309964cfed900fabb"
Commit 40fcc1e1 authored by Benjamin Thomas Graham's avatar Benjamin Thomas Graham
Browse files

to

parent ecc6e480
...@@ -22,6 +22,10 @@ class SparseConvNetTensor(object): ...@@ -22,6 +22,10 @@ class SparseConvNetTensor(object):
t = self.metadata.getSpatialLocations(spatial_size) t = self.metadata.getSpatialLocations(spatial_size)
return t return t
def to(self, device):
self.features=self.features.to(device)
return self
def type(self, t=None): def type(self, t=None):
if t: if t:
self.features = self.features.type(t) self.features = self.features.type(t)
......
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