Added type hints to ResNetForImageClassification (#19084)

* Added type hints to ResNetForImageClassification

* Resolved check_repository_consistency failure issue

Running fix-copies changed the type hints for RegNetForImageClassification in modeling_regnet.py file
This commit is contained in:
S.Kishore 2022-09-19 18:12:13 +05:30 committed by GitHub
parent fe5e7cea4a
commit 6f25d107fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -407,10 +407,10 @@ class RegNetForImageClassification(RegNetPreTrainedModel):
)
def forward(
self,
pixel_values: Tensor = None,
labels: Tensor = None,
output_hidden_states: bool = None,
return_dict: bool = None,
pixel_values: Optional[torch.FloatTensor] = None,
labels: Optional[torch.LongTensor] = None,
output_hidden_states: Optional[bool] = None,
return_dict: Optional[bool] = None,
) -> ImageClassifierOutputWithNoAttention:
r"""
labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*):

View File

@ -370,10 +370,10 @@ class ResNetForImageClassification(ResNetPreTrainedModel):
)
def forward(
self,
pixel_values: Tensor = None,
labels: Tensor = None,
output_hidden_states: bool = None,
return_dict: bool = None,
pixel_values: Optional[torch.FloatTensor] = None,
labels: Optional[torch.LongTensor] = None,
output_hidden_states: Optional[bool] = None,
return_dict: Optional[bool] = None,
) -> ImageClassifierOutputWithNoAttention:
r"""
labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*):