Unverified Commit 6f25d107 authored by S.Kishore's avatar S.Kishore Committed by GitHub
Browse files

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
parent fe5e7cea
......@@ -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*):
......
......@@ -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*):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment