Skip to content

Commit b54e23d

Browse files
committed
Fix grad assignment in other test
1 parent 2a73808 commit b54e23d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/attr/layer/test_grad_cam.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ def test_simple_input_conv_relu(self) -> None:
4848
def test_simple_input_conv_without_final_relu(self) -> None:
4949
net = BasicModel_ConvNet_One_Conv()
5050
inp = torch.arange(16).view(1, 1, 4, 4).float()
51-
inp.requires_grad_()
5251
# Adding negative value to test final relu is not applied by default
5352
inp[0, 0, 1, 1] = -4.0
53+
inp.requires_grad_()
5454
self._grad_cam_test_assert(
5555
net, net.conv1, inp, (0.5625 * inp,), attribute_to_layer_input=True
5656
)

0 commit comments

Comments
 (0)