批归一化`x.mean(dim=0, keepdim=True)`

x.mean(dim=0, keepdim=True)

keepdim=True表示维度不变

waveform, source_sr = torchaudio.load("4.wav")
waveform

tensor([[0.0000, 0.0000, 0.0000, …, 0.0016, 0.0016, 0.0012],
[0.0000, 0.0000, 0.0000, …, 0.0019, 0.0019, 0.0020]])

waveform.mean(0, True)

tensor([[0.0000, 0.0000, 0.0000, …, 0.0017, 0.0017, 0.0016]])

你可能感兴趣的:(音乐音频,python,人工智能,深度学习)