Skip to content

Commit

Permalink
fix: encoder attn
Browse files Browse the repository at this point in the history
  • Loading branch information
borisdayma committed Jul 9, 2022
1 parent 8acc6b7 commit caafeee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vqgan_jax/modeling_flax_vqgan.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,12 @@ def setup(self):
dtype=self.dtype)

def __call__(self, hidden_states, temb=None, deterministic: bool = True):
for res_block in self.block:
for i, res_block in enumerate(self.block):
hidden_states = res_block(hidden_states,
temb,
deterministic=deterministic)
for attn_block in self.attn:
hidden_states = attn_block(hidden_states)
if self.attn:
hidden_states = self.attn[i](hidden_states)

if self.downsample is not None:
hidden_states = self.downsample(hidden_states)
Expand Down

0 comments on commit caafeee

Please sign in to comment.