Skip to content

Commit c06a7dc

Browse files
committed
fix: Removed duplicate type hint
1 parent d56a5e2 commit c06a7dc

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

torchvision/models/densenet.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,35 +44,30 @@ def __init__(
4444
self.memory_efficient = memory_efficient
4545

4646
def bn_function(self, inputs: List[Tensor]) -> Tensor:
47-
# type: (List[Tensor]) -> Tensor
4847
concated_features = torch.cat(inputs, 1)
4948
bottleneck_output = self.conv1(self.relu1(self.norm1(concated_features))) # noqa: T484
5049
return bottleneck_output
5150

5251
# todo: rewrite when torchscript supports any
5352
def any_requires_grad(self, input: List[Tensor]) -> Tensor:
54-
# type: (List[Tensor]) -> bool
5553
for tensor in input:
5654
if tensor.requires_grad:
5755
return True
5856
return False
5957

6058
@torch.jit.unused # noqa: T484
6159
def call_checkpoint_bottleneck(self, input: List[Tensor]) -> Tensor:
62-
# type: (List[Tensor]) -> Tensor
6360
def closure(*inputs):
6461
return self.bn_function(inputs)
6562

6663
return cp.checkpoint(closure, *input)
6764

6865
@torch.jit._overload_method # noqa: F811
6966
def forward(self, input: List[Tensor]) -> Tensor:
70-
# type: (List[Tensor]) -> (Tensor)
7167
pass
7268

7369
@torch.jit._overload_method # noqa: F811
7470
def forward(self, input: Tensor) -> Tensor:
75-
# type: (Tensor) -> (Tensor)
7671
pass
7772

7873
# torchscript does not yet support *args, so we overload method

0 commit comments

Comments
 (0)