Johannes Kolbe
commited on
Commit
•
424816e
1
Parent(s):
f5fc044
remove cuda() call
Browse files
utils.py
CHANGED
@@ -28,7 +28,7 @@ def to_tensor(array):
|
|
28 |
A `torch.Tensor` with dtype `torch.FloatTensor` on cuda device.
|
29 |
"""
|
30 |
assert isinstance(array, np.ndarray)
|
31 |
-
return torch.from_numpy(array).type(torch.FloatTensor)
|
32 |
|
33 |
|
34 |
def postprocess(images, min_val=-1.0, max_val=1.0):
|
|
|
28 |
A `torch.Tensor` with dtype `torch.FloatTensor` on cuda device.
|
29 |
"""
|
30 |
assert isinstance(array, np.ndarray)
|
31 |
+
return torch.from_numpy(array).type(torch.FloatTensor)
|
32 |
|
33 |
|
34 |
def postprocess(images, min_val=-1.0, max_val=1.0):
|