Currently, quantizers peform stochastic operations even in inference mode (K.learning_phase() = 0). This mechanism prevents this and uses the non-stochastic version of the quantizer if in inference mode.
Added
base_quantizer class with is_training attribute and setter method
unit tests for stochastic quantizers inference mode behavior
Modified:
stochastic_{ternary, binary} now inherit from their non stochastic counterparts to delegate inference mode computaiton
Order of quantizer definition to perfom inheritance
Used the super invokation method in quantizers instead of referring to the base class explicitly
set the proper learning_phase in qactivation_test, qconvolutional_test
Fixed _round_through and _clip_power_of_two and their references by using smart_cond to disable stochastic behavior
Some fixes by Claudionor:
Fixed multiple instance of tensorflow conditionals in quantizers.py
Changed stochastic_ternary test to remove the 0 variance cases
Currently, quantizers peform stochastic operations even in inference mode (K.learning_phase() = 0). This mechanism prevents this and uses the non-stochastic version of the quantizer if in inference mode.
Added
Modified:
Some fixes by Claudionor: