Now how can I create a config.json file for this?
Normally, if you save your model using the
.save_pretrained() method, it will save both the model weights and a
config.json file in the specified directory.
Yes, but this is a custom model that I have saved in pytorch style, since it consists of additional layers, is there anyway to generate confg.json file?
You need to subclass it to have the save_pretrained methods available. So instead of
from transformers.modeling_utils import PreTrainedModel class Mean_Pooling_Model(PreTrainedModel):
It will add extra functionality on top of
Thank you I will try this!
Is it possible to generate the configuration file for already trained model , i.e weights stored in normal pytorch model.bin