mirror of https://github.com/vladmandic/automatic
fix tensor to np
parent
4823595dc9
commit
d71287e068
|
|
@ -1 +1 @@
|
|||
Subproject commit 96dbc601a6c880571d3a2a1314052d0922114604
|
||||
Subproject commit 0d0841671ef165d6d408f7b9cd6bfb1dda3d78cf
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 08fc2647f1fe413699612df923b5f495d26853ef
|
||||
Subproject commit 323ce7efef3e3f67b11c09c9e7fa3567d293b048
|
||||
|
|
@ -757,7 +757,7 @@ def validate_sample(tensor):
|
|||
sample = 255.0 * np.moveaxis(tensor.cpu().numpy(), 0, 2)
|
||||
else:
|
||||
sample = 255.0 * tensor
|
||||
if isinstance(tensor, torch.Tensor):
|
||||
if isinstance(tensor, torch.Tensor) and hasattr(tensor, 'detach'):
|
||||
sample = sample.detach().cpu().numpy()
|
||||
with warnings.catch_warnings(record=True) as w:
|
||||
cast = sample.astype(np.uint8)
|
||||
|
|
|
|||
Loading…
Reference in New Issue