hyseob / Batch-Instance-Normalization

Batch-Instance Normalization (BIN)
MIT License
79 stars 17 forks source link

Parameter gate should be in [0, 1] #2

Open boscotsang opened 5 years ago

boscotsang commented 5 years ago

According to paper, the parameter should be clipped to [0, 1]. It seems that the implementation didn't clip the gate so the gate may be large than 1 which result in the change of sign of output

tea1528 commented 5 years ago

It seems like the gate is clipped in the main.py. You should check the train function from main.py.

leebebeto commented 3 years ago

Thanks for the fantastic work! I have the similar question because in the main.py line 194, getattr(p, 'bin_gate') is set to False However, in the batchinstancenorm.py, setatttr(p, 'bin_gate') is set to True If this is the case, all parameters except the gate is clipped between 0~1 which may not be the original intention

If I am making mistake, please let me know

Again thanks for the codes and work, Thanks, in advance

Aniruddha-Deb commented 1 year ago

@leebebeto False is the default attribute that getattr should return if the attribute doesn't exist in the object (Source: getattr documentation)