add demofusion

This commit is contained in:
Vladimir Mandic
2023-12-09 14:15:48 -05:00
parent f91735deac
commit 1b1ae6784c
6 changed files with 1298 additions and 7 deletions
+2
View File
@@ -757,6 +757,8 @@ def validate_sample(tensor):
sample = 255.0 * np.moveaxis(tensor.cpu().numpy(), 0, 2)
else:
sample = 255.0 * tensor
if isinstance(tensor, torch.Tensor):
sample = sample.detach().cpu().numpy()
with warnings.catch_warnings(record=True) as w:
cast = sample.astype(np.uint8)
if len(w) > 0: