diff --git a/src/transformers/models/regnet/modeling_regnet.py b/src/transformers/models/regnet/modeling_regnet.py index 2e6da1eaa38bc9..2295fbeeabfdfd 100644 --- a/src/transformers/models/regnet/modeling_regnet.py +++ b/src/transformers/models/regnet/modeling_regnet.py @@ -295,7 +295,7 @@ def _init_weights(self, module): REGNET_START_DOCSTRING = r""" This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass. Use it - as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and + as a regular PyTorch Module and refer to the PyTorch documentation for all matters related to general usage and behavior. Parameters: diff --git a/src/transformers/models/regnet/modeling_tf_regnet.py b/src/transformers/models/regnet/modeling_tf_regnet.py index 0c411df9f97961..28115d718b0f4e 100644 --- a/src/transformers/models/regnet/modeling_tf_regnet.py +++ b/src/transformers/models/regnet/modeling_tf_regnet.py @@ -456,11 +456,12 @@ def input_signature(self): REGNET_START_DOCSTRING = r""" - Parameters: This model is a Tensorflow [tf.keras.layers.Layer](https://www.tensorflow.org/api_docs/python/tf/keras/layers/Layer) sub-class. Use it as a regular Tensorflow Module and refer to the Tensorflow documentation for all matter related to general usage and behavior. + + Parameters: config ([`RegNetConfig`]): Model configuration class with all the parameters of the model. Initializing with a config file does not load the weights associated with the model, only the configuration. Check out the [`~TFPreTrainedModel.from_pretrained`] method to load the model weights. diff --git a/utils/check_docstrings.py b/utils/check_docstrings.py index ca8141ebb42003..3c466310397946 100644 --- a/utils/check_docstrings.py +++ b/utils/check_docstrings.py @@ -654,6 +654,8 @@ "TFRagModel", "TFRagSequenceForGeneration", "TFRagTokenForGeneration", + "TFRegNetForImageClassification", + "TFRegNetModel", "TFRemBertForCausalLM", "TFRemBertForMaskedLM", "TFRemBertForMultipleChoice", @@ -1214,7 +1216,10 @@ def check_docstrings(overwrite: bool = False): error_message += "\n" + "\n".join([f"- {name}" for name in hard_failures]) if len(failures) > 0: error_message += ( - "The following objects docstrings do not match their signature. Run `make fix-copies` to fix this." + "The following objects docstrings do not match their signature. Run `make fix-copies` to fix this. " + "In some cases, this error may be raised incorrectly by the docstring checker. If you think this is the " + "case, you can manually check the docstrings and then add the object name to `OBJECTS_TO_IGNORE` in " + "`utils/check_docstrings.py`." ) error_message += "\n" + "\n".join([f"- {name}" for name in failures]) if len(to_clean) > 0: