Spaces:
Running
Running
Auto-deploy from GitHub: f28d8e4c0c69ce5da7e610a493fe42e9b8517bb8
Browse files
src/spectttra/spectttra_trainer.py
CHANGED
|
@@ -128,7 +128,7 @@ def spectttra_predict(audio_tensor):
|
|
| 128 |
melspec = torch.nn.functional.pad(melspec, (0, padding))
|
| 129 |
|
| 130 |
if device.type == "cuda":
|
| 131 |
-
with torch.
|
| 132 |
tokens = model(melspec)
|
| 133 |
pooled = tokens.mean(dim=1)
|
| 134 |
else:
|
|
|
|
| 128 |
melspec = torch.nn.functional.pad(melspec, (0, padding))
|
| 129 |
|
| 130 |
if device.type == "cuda":
|
| 131 |
+
with torch.amp.autocast("cuda", enabled=True):
|
| 132 |
tokens = model(melspec)
|
| 133 |
pooled = tokens.mean(dim=1)
|
| 134 |
else:
|