Wav2Vec2Model: Expected 3-dimensional input for 3-dimensional weight [512, 10, 10], but got 4-dimensional input of size [16, 1, 10, 1000] instead
I’m trying to useWav2Vec2Modelwith a multi-channel input. For this, I have edited the 1st layer in the feature_extractor of  Wav2Vec2Model.Code:from transformers import Wav2Vec2Model, Wav2Vec2Config

configuration = Wav2Vec2Config()
model = Wav2Vec2Model(configuration)

model.feature_extractor.conv_layers[0].conv = nn.Conv1d(10, 512, kernel_size=(10,), stride=(5,), bias=False)

input = torch.rand(16,10,1000)
out = model(input)Input Shape:(16, 10, 1000) where 16: batch size ; 10: num of channels ; 100: lengthError:RuntimeError: Expected 3-dimensional input for 3-dimensional weight [512, 10, 10], but got 4-dimensional input of size [16, 1, 10, 1000] insteadAny solutions?
2021-07-22T16:11:01Z
this problem seems to be related toHuBERT: RuntimeError: Expected 3-dimensional input for 3-dimensional weight but got 5-dimensional inputModelsI get an error 
RuntimeError: Expected 3-dimensional input for 3-dimensional weight [512, 1, 10], but got 5-dimensional input of size [1, 1, 1, 240000, 2] instead

while feeding the Wav2Vec2Processor and HubertForCTC with a wav audio file: 
processor = Wav2Vec2Processor.from_pretrained("facebook/hubert-xlarge-ls960-ft"
    , cache_dir=os.getenv("cache_dir", "../../models"))
model = HubertForCTC.from_pretrained("facebook/hubert-xlarge-ls960-ft"
    , cache_dir=os.getenv("cache_dir", "../../models…