mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-27 13:12:20 +08:00
added option to change default tensor
This commit is contained in:
1 parent
5a7ad19403
commit
e3425ec6a0
2 files changed
+2
-2
No files matched your search
@@ -40,8 +40,7 @@ class RootModule(GradInformation, ModelIO, OptimizerConfig, ModelHooks):
|
||||
|
||||
if self.on_gpu:
|
||||
print('running on gpu...')
|
||||
self.dtype = torch.cuda.FloatTensor
|
||||
torch.set_default_tensor_type('torch.cuda.FloatTensor')
|
||||
torch.set_default_tensor_type(hparams.default_tensor_type)
|
||||
|
||||
def forward(self, *args, **kwargs):
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user