When initializing a wav2vec2 model, as follows:
feature_extractor = Wav2Vec2Processor.from_pretrained('facebook/wav2vec2-base')
wav_to_vec_model = Wav2Vec2Model.from_pretrained('facebook/wav2vec2-base')
I get the following warning:
UserWarning: Passing
gradient_checkpointing to a config initialization is deprecated and will be removed in v5 Transformers. Using
model.gradient_checkpointing_enable() instead, or if you are using the
Trainer API, pass
gradient_checkpointing=True in your
TrainingArguments.
I’m not using the TrainerAPI, so I tried adding:
wav_to_vec_model.gradient_checkpointing_enable()
Which doesn’t work. What am I doing wrong? Thanks