mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-03 03:31:05 +06:00
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:
parent
fe5e7cea4a
commit
6f25d107fd
@ -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*):
|
||||
|
Loading…
Reference in New Issue
Block a user