optimize: 精简未用到的配置项并在特征提取初步引入mps (#32)

This commit is contained in:
源文雨
2023-04-11 18:14:55 +08:00
committed by GitHub
parent 0656591373
commit ecc744d748
10 changed files with 82 additions and 57 deletions

View File

@@ -27,7 +27,7 @@ def inference(X_spec, device, model, aggressiveness,data):
start = i * roi_size
X_mag_window = X_mag_pad[None, :, :, start:start + data['window_size']]
X_mag_window = torch.from_numpy(X_mag_window)
if(is_half==True):X_mag_window=X_mag_window.half()
if(is_half):X_mag_window=X_mag_window.half()
X_mag_window=X_mag_window.to(device)
pred = model.predict(X_mag_window, aggressiveness)