detach when u want
Browse files
dronescapes_reader/dronescapes_representations.py
CHANGED
@@ -24,7 +24,7 @@ class EdgesRepresentation(NpzRepresentation):
|
|
24 |
return res
|
25 |
|
26 |
def plot_fn(self, x: tr.Tensor) -> np.ndarray:
|
27 |
-
return (x.repeat(1, 1, 3) * 255).cpu().numpy().astype(np.uint8)
|
28 |
|
29 |
class DepthRepresentation(NpzRepresentation):
|
30 |
"""DepthRepresentation. Implements depth task-specific stuff, like hotmap."""
|
|
|
24 |
return res
|
25 |
|
26 |
def plot_fn(self, x: tr.Tensor) -> np.ndarray:
|
27 |
+
return (x.detach().repeat(1, 1, 3) * 255).cpu().numpy().astype(np.uint8)
|
28 |
|
29 |
class DepthRepresentation(NpzRepresentation):
|
30 |
"""DepthRepresentation. Implements depth task-specific stuff, like hotmap."""
|