Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed torch warning on using a list of numpy arrays #6382

Merged
merged 2 commits into from
Apr 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nemo/collections/asr/models/label_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,9 @@ def infer_file(self, path2audio_file):
audio = librosa.core.resample(audio, orig_sr=sr, target_sr=target_sr)
audio_length = audio.shape[0]
device = self.device
audio = np.array(audio)
audio = np.array([audio])
audio_signal, audio_signal_len = (
torch.tensor([audio], device=device),
torch.tensor(audio, device=device),
torch.tensor([audio_length], device=device),
)
mode = self.training
Expand Down