Offline Datasets res net optionality

This commit is contained in:
Si11ium
2020-03-12 18:32:23 +01:00
parent 2f99341cc3
commit bb47e07566
11 changed files with 638 additions and 140 deletions

View File

@@ -22,7 +22,7 @@ class Flatten(nn.Module):
try:
x = torch.randn(self.in_shape).unsqueeze(0)
output = self(x)
return output.shape[1:]
return output.shape[1:] if len(output.shape[1:]) > 1 else output.shape[-1]
except Exception as e:
print(e)
return -1