12 Commits
Author SHA1 Message Date
David Stygstra 7577b8780a Fix BatchRenormalization clipping (fixes #127)
Previouly, a constant value was used for the clipping parameters. This
meant that it stayed at r=1 and d=0 forever, making it essentially
equivalent to regular batch normalization.
2017-10-11 18:45:35 -07:00
Somshubra Majumdar 821eff3948 fix normalization tests 2017-09-22 13:14:15 -05:00
Michael Oliver c4d1a61746 fix missing paren 2017-08-16 21:01:26 -07:00
Michael Oliver 4ae3058c92 change np.exp to K.exp (#128)
* change np.exp to K.exp

To address https://github.com/farizrahman4u/keras-contrib/issues/127

* Update normalization.py

* Updates as suggested
2017-08-16 20:56:03 -07:00
Mathieu Marquis Bolduc f0bb5becbb Instance Normalization layer (#101)
* Instance Normalization layer

* fix Instance Normalization for theano broadcasting rules

* Support rank 1 tensor in Instance Normalization

* address issue with axis parameter in instance normalization and add unit test for per channel correctness

* avoid assert_raises in normalization unit test

* Instance normalization set axis default to None
2017-06-19 08:57:54 -07:00
Somshubra Majumdar 8ef69698b8 Update BatchRenorm to Keras 2 API (#69)
* Update BatchRenorm to Keras 2 API

* update tests

* Remove mode 1 test (mode 1 doesnt exist anymore)
2017-04-15 09:43:55 -07:00
farizrahman4u 69b286ce83 serialization fix 2017-03-19 09:00:15 +05:30
farizrahman4u da8cf81ffd typo 2017-03-19 08:51:09 +05:30
farizrahman4u 87b43828e0 initializations -> initializers 2017-03-19 08:49:50 +05:30
farizrahman4u 70b8225abc update all to K2 2017-03-19 08:01:52 +05:30
Somshubra Majumdar bdc64bf2f3 Added Batch Renormalization Layer (#28)
* Began work on batch renormalization

* Correct the implementation to use broadcasting properly, so it supports th dim ordering

* Correct the implementation to use broadcasting properly, so it supports th dim ordering

* Corrected normalizing term for d

* Moved location of updates

* Fixed the training problems and now auto adjusts the r_max and d_max values

* Removed unused code comments

* Finished implementation of batch renormalization

* Corrected the get_config method

* Added tests

* Added user changeable parameter t_delta to change the rate at which time steps increase

* Updated tests to state renorm everywhere

* Attempt a fix for mode=1 test fail (giving nans)

* Applied fix for nans to all calculations involving running mean and std

* Corrected time delta default value

* Reverts a mistake in pytest settings

* Corrections to calculations of r and d due to wrong variable naming (running_std perserves running_variance)

* Added t_delta to get_config

* Fix commit change mixup

* Corrected the check for uses_learning_flag

* Made a few corrections, added moments to backend, added test to backend

* Probable fix for test

* Corrected backend test

* Added support for mode 2
2017-02-22 09:07:13 -08:00
farizrahman4u e31c3ce7bd Add layers 2017-01-25 10:26:05 +05:30