Skip to content

Commit

Permalink
small fix to make model behave the same as before with old weights
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislav Pidhorskyi committed Dec 7, 2020
1 parent d43e061 commit 42bcf2e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net.py
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,8 @@ def forward(self, x):
x = self.map_blocks[i](x)
# We select just one output. For compatibility with older models.
# All other outputs are ignored
return x[:, 0, 0]
# It is the same as if the last layer had one output.
return x[:, 0, x.shape[2] // 2]


@MAPPINGS.register("MappingDNoStyle")
Expand Down

0 comments on commit 42bcf2e

Please sign in to comment.