Skip to content

Commit

Permalink
added warning on zero initialization (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
invemichele authored Mar 24, 2023
1 parent 03d8e19 commit fbba56f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bgflow/factory/generator_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ def build_flow(self, zero_parameters=False):
"""
flow = SequentialFlow(self.layers)
if zero_parameters:
warnings.warn("Initializing the flow with zeros makes it much less flexible", UserWarning)
for p in flow.parameters():
p.data.zero_()
return flow
Expand Down

0 comments on commit fbba56f

Please sign in to comment.