Commit 40a19d20 authored by rusty1s's avatar rusty1s
Browse files

reasonable default dtype

parent 258dbf0f
...@@ -292,7 +292,8 @@ class SparseTensor(object): ...@@ -292,7 +292,8 @@ class SparseTensor(object):
if value is not None: if value is not None:
return value return value
else: else:
return torch.tensor(0., device=self.storage.col().device) return torch.tensor(0., dtype=torch.float,
device=self.storage.col().device)
def device(self): def device(self):
return self.storage.col().device return self.storage.col().device
......
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