mirror of
https://github.com/jantic/DeOldify.git
synced 2026-08-28 17:45:27 +08:00
Minor cpu performance fix and typo fix.
This commit is contained in:
+1
-2
@@ -13,7 +13,7 @@ class _Device:
|
||||
|
||||
def is_gpu(self):
|
||||
''' Returns `True` if the current device is GPU, `False` otherwise. '''
|
||||
return self.current() is not DeviceID.CPU
|
||||
return self.current() is not DeviceId.CPU
|
||||
|
||||
def current(self):
|
||||
return self._current_device
|
||||
@@ -26,6 +26,5 @@ class _Device:
|
||||
import torch
|
||||
torch.backends.cudnn.benchmark=False
|
||||
|
||||
os.environ['OMP_NUM_THREADS']='1'
|
||||
self._current_device = device
|
||||
return device
|
||||
Reference in New Issue
Block a user