Skip to content

Commit 0f8ec77

Browse files
jsawrukfacebook-github-bot
authored andcommitted
Fix pyre-fixme[61] in Binary Concrete Stochastic Gates test (#1578)
Summary: Pull Request resolved: #1578 title Reviewed By: jjuncho Differential Revision: D75988102 fbshipit-source-id: c2226d96d39ebfe2a26b752a90dde59bddec9539
1 parent 584a1ff commit 0f8ec77

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/module/test_binary_concrete_stochastic_gates.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ def test_bcstg_2d_input(self) -> None:
143143
gated_input, reg = bcstg(input_tensor)
144144

145145
expected_reg = 4.9903
146+
expected_gated_input = []
147+
146148
if self.testing_device == "cpu":
147149
expected_gated_input = [
148150
[[0.0000, 0.0990], [0.0261, 0.2431], [0.0551, 0.3863]],
@@ -154,7 +156,6 @@ def test_bcstg_2d_input(self) -> None:
154156
[[0.1840, 0.1571], [0.4612, 0.7937], [0.2975, 0.7393]],
155157
]
156158

157-
# pyre-fixme[61]: `expected_gated_input` is undefined, or not always defined.
158159
assertTensorAlmostEqual(self, gated_input, expected_gated_input, mode="max")
159160
assertTensorAlmostEqual(self, reg, expected_reg)
160161

0 commit comments

Comments
 (0)