Skip to content

Commit f602844

Browse files
Vivek Miglanifacebook-github-bot
authored andcommitted
Fix Binary Stochastic Gates pyre fixme issues (#1600)
Summary: Pull Request resolved: #1600 Fixing unresolved pyre fixme issues in corresponding file Reviewed By: cyrjano Differential Revision: D76737762 fbshipit-source-id: 24d648c232b34d9b5241a8b56d06e0e9c53f21a8
1 parent c46df02 commit f602844

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

captum/module/binary_concrete_stochastic_gates.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,9 @@ def __init__(
134134
self.eps = eps
135135

136136
# pre-calculate the fixed term used in active prob
137-
# pyre-fixme[4]: Attribute must be annotated.
138-
self.active_prob_offset = temperature * math.log(-lower_bound / upper_bound)
137+
self.active_prob_offset: float = temperature * math.log(
138+
-lower_bound / upper_bound
139+
)
139140

140141
def _sample_gate_values(self, batch_size: int) -> Tensor:
141142
"""

0 commit comments

Comments
 (0)