I have two Bert models. I detached the classifier layer and kept the pre_classifier and drop out layers. Then I created an ensamble that has the classifier layer.
So the output of the two BERT models will be concatenated on the ensamble, then will be input to the classifier layer.
The problem is that I’m getting errors about running out of memory. So how can I save the output of each model to the csv file, then concatenate the two files and run the ensamble model for classification?