• Zhaoheng Ni's avatar
    Add assertion checks to multi-channel functions (#2401) · 38e530d7
    Zhaoheng Ni authored
    Summary:
    - The multi-channel functions only support complex-valued tensors for spectrogram and PSD matrices.
    - The mask can be real-valued or complex-valued, hence there is no explicit assertion for mask.
    - The shape of input Tensors need to be verified before the computation. For example, the shape of PSD matrix must be `(..., freq, channel, channel)`, the shape of the mask must be `(..., freq, time)`, etc.
    - The autograd unittest of `apply_beamforming` has wrong dimensions for beamform_weights detected by the assertion check. FIx it in this PR.
    
    Pull Request resolved: https://github.com/pytorch/audio/pull/2401
    
    Reviewed By: carolineechen
    
    Differential Revision: D36597689
    
    Pulled By: nateanl
    
    fbshipit-source-id: 6ad1adebe3726851cc1d865650bdf177a98985f6
    38e530d7
autograd_impl.py 14.6 KB