quoting from How to create a config.json after saving a model - #4 by BramVanroy
instead of
class modelWithLossFunc(nn.Module):
use
from transformers.modeling_utils import PreTrainedModel
class modelWithLossFunc(PreTrainedModel):
quoting from How to create a config.json after saving a model - #4 by BramVanroy
instead of
class modelWithLossFunc(nn.Module):
use
from transformers.modeling_utils import PreTrainedModel
class modelWithLossFunc(PreTrainedModel):