"git@developer.sourcefind.cn:one/TransferBench.git" did not exist on "ab945c1d479f33033ad992990beb26f1047d2bba"
Commit bcfa9eed authored by moto's avatar moto Committed by Facebook GitHub Bot
Browse files

Fix error message (#2999)

Summary: Pull Request resolved: https://github.com/pytorch/audio/pull/2999

Reviewed By: hwangjeff

Differential Revision: D42637618

Pulled By: mthrok

fbshipit-source-id: 35a7976c316e3b3899ae9c2202f132f1a960b736
parent de9473a4
...@@ -134,7 +134,7 @@ class FeatureExtractor(Module): ...@@ -134,7 +134,7 @@ class FeatureExtractor(Module):
Valid length of each output sample. shape: ``[batch, ]``. Valid length of each output sample. shape: ``[batch, ]``.
""" """
if x.ndim != 2: if x.ndim != 2:
raise ValueError("Expected the input Tensor to be 2D (batch, time), " "but received {list(x.shape)}") raise ValueError(f"Expected the input Tensor to be 2D (batch, time). Found: {list(x.shape)}")
x = x.unsqueeze(1) # (batch, channel==1, frame) x = x.unsqueeze(1) # (batch, channel==1, frame)
for layer in self.conv_layers: for layer in self.conv_layers:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment