Commit Graph

30 Commits

Author SHA1 Message Date
Chen Qian 1f14395415
Get compatible with optimizer migration in TF 2.11 (#2766)
* Get compatible with optimizer migration in TF 2.11

* Fix comments

* add adamw to the change

* Add type exception
2022-10-11 22:37:29 +02:00
Chen Qian 339159fc36
Point optimizer to tf.keras.optimizer.legacy.Optimizer to be compatib… (#2706)
* Point optimizer to tf.keras.optimizer.legacy.Optimizer to be compatible with Keras optimizer migration

* small fix

* add version control

* small fix

* Update discriminative_layer_training.py

* fix version control

* small fix

* move optimizer class to __init__.py

* small fix

* fix problems

* small fix

* Rename BaseOptimizer to KerasLegacyOptimizer

* exclude keras optimizer from type check

* fix import
2022-06-20 07:46:55 +08:00
Lucas David 824877d471
Increment iterations in MultiOptimizer.apply_gradients() (#2714) 2022-06-03 21:24:41 +08:00
Sean Morgan 53d70f21cb
Update source_code_test.py (#2656) 2022-02-01 11:42:22 +01:00
Faizan Muhammad e2ae50d6e9
Generate Assertion Ops for interpolate_bilinear (#2609) 2021-11-19 02:06:38 +01:00
Thai Nguyen 6593453082
Add experimental_implements attribute to dense_image_warp (#2344)
* Add experimental_implements attribute to dense_image_warp

This attribute will help the TFLite conversion.

* fix backdrop test error

* add to experimental allowlist
2021-01-14 21:22:48 -08:00
Tzu-Wei Sung 14c67db09a
Remove control dependency (#2319) 2020-12-27 21:23:15 -08:00
Sean Morgan 2969e63b1a
Build against TF2.4 (#2250)
* Add CUDA11 toolchain
2020-12-15 09:30:28 -08:00
Thai Nguyen 9bac29cce0
Add MaxUnpooling2D layer (#2272)
* Add MaxUnpooling2D op to tensorflow addons
2020-12-09 20:29:26 -08:00
Gabriel de Marmiesse 9acab6a942
Bump black (#2135)
* Bump the black version. Fixes the ci.

* Removed trailing commas.

* Update tensorflow_addons/image/filters.py

* Update tensorflow_addons/image/cutout_ops.py

* Removed trailing commas.

* Removed commas.

* Removed some more commas.

* Removed some commas.

* Removed some commas.

* Update tensorflow_addons/optimizers/moving_average.py

* Update tensorflow_addons/losses/tests/kappa_loss_test.py

* Update tensorflow_addons/layers/tests/wrappers_test.py

* Update tensorflow_addons/layers/tests/wrappers_test.py

* Update tensorflow_addons/layers/tests/wrappers_test.py

* Update tensorflow_addons/layers/tests/spectral_normalization_test.py

* Update tensorflow_addons/layers/tests/spectral_normalization_test.py

* Update tensorflow_addons/losses/tests/triplet_test.py

* Update tensorflow_addons/metrics/tests/hamming_test.py

* Update tensorflow_addons/metrics/tests/multilabel_confusion_matrix_test.py

* Update tensorflow_addons/optimizers/lookahead.py

* Update tensorflow_addons/metrics/tests/multilabel_confusion_matrix_test.py

* Update tensorflow_addons/metrics/r_square.py

* Removed commas.

* Removed commas.
2020-08-28 19:56:11 -07:00
Tzu-Wei Sung 81301f89cb
Use tf.keras.backend.moving_average_update instead of private api (#1989) 2020-07-12 00:00:29 -07:00
Tzu-Wei Sung 5f746971d0
Use tf.raw_ops instead of private API (#1975) 2020-07-08 14:29:54 +08:00
Guillaume Klein 4392743a32
Update list of files using tf.compat.v1 symbols (#1954) 2020-06-29 10:21:58 -04:00
Qianli Scott Zhu ea99e7adcb
Move the tf.keras.layers.PeepholeLSTMCell to tfa (#1944)
* Move the tf.keras.layers.PeepholeLSTMCell to tfa
This cell was exported under tf core API as an experimental since 2.0, but I think tfa should be a better place for this implementation. 
We are planing to deprecate and eventually remove the PeepholeLSTMCell in the tf core API once this is landed.

* Update peephole lstm cell test with golden values.
We removed the v1 compat API since TFA only works with TF v2.

* Add PeepholeLSTMCell to the exception list for typehint check.
The cell itself doesn't have __init__ and it  inherit the __init__ from keras.LSTMcell, which doesn't have type hint yet.

* Fix format.
* Update build method to be more aligned with py3 style.
2020-06-26 12:09:02 -04:00
Dheeraj R Reddy def106c074
Remove tf.control_dependencies from SWA (#1805)
* Remove tf.control_dependencies from SWA
* Wrap `average_op` in `tf.function`
* Replace tf.where with python if
* Use locking param for assign
* Remove SWA from exceptions
2020-06-16 07:42:18 -04:00
Sean Morgan 6a91f56485
* Update to informative list names (#1932) 2020-06-16 07:40:42 -04:00
who who who 40d8e59cbf
remove internal modules (#1812)
* remove internal modules

* clean up

* refact

* remove six

* remove losses

* refact get_config
2020-05-19 10:18:34 -07:00
Gabriel de Marmiesse 2ef9c20507
Prohibiting the use of tf.cond in the codebase. (#1798)
* Added a rule preventing tf.cond
2020-05-12 11:54:19 -04:00
Gabriel de Marmiesse 0da23c184b
Prohibit the use of tf.control_dependencies. (#1799)
* Prohibit the use of tf.control_dependencies.
* Added info in the README.
2020-05-12 11:17:14 -04:00
Tzu-Wei Sung b43cd02090
get rid of private api (#1776) 2020-05-02 17:05:16 -07:00
Gabriel de Marmiesse 0fd30a4e36
Removed all tf.compat.v1 in skip_gram_ops_test.py (#1736)
* Removing set_random_seed.

* Removed from blacklist.
2020-04-26 12:08:47 -04:00
Gabriel de Marmiesse a26af4fa95
Clarify the purpose of the blacklists in source_code_test.py (#1725) 2020-04-25 09:31:18 -04:00
Gabriel de Marmiesse 5b12ae5b0e
Finishing the pytest migration. (#1661)
* Removed run_all_in_graph_and_eager_mode in attention_wrapper_test.py.

* Refactoring.

* Some black bug.

* Done one test.

* Fuse functions.

* Rewrite with unittest2pytest.

* Moved function.

* Removed use gpu.

* Remove prints.

* Removed one assertAllclose.

* Removed some more self.

* Removed some more self.

* Moved function out of class.

* Removed one function.

* Removed some self.

* Moved a function out of tf.test.TestCase.

* Removed decorator.

* IIII

* Removed the run functions eagerly.

* Removed import.

* Removed is_multi.

* Removed self for batch.

* Removed some more self.

* Removed some more self.

* Removed some stuff.

* Unholy stuff there.

* Found a way to replace that.

* Works well.

* Removed self completely from function.

* Removed self from parameters.

* Managed to move the function.

* It works with pytest only.

* Fully converted to pytest.

* Minor simplification.

* Some comment.

* Removed some unused functions.

* Removed some elements from the test_no_deprecated_v1.

* Removed some files from blacklists.

* Forgot to remove run_eagerly.

* Removed tf.executing_eagerly.
2020-04-24 14:28:32 +02:00
Ashutosh Hathidara 10f718f9ca
Added LossFunctionWrapper for losses and simplified code (#1688)
* Added LossFunctionWrapper for losses and simplified code

* resolving errors

* Undone changes for npairs and sparsemax_loss

* Resolving errors
2020-04-21 21:16:24 -07:00
Gabriel de Marmiesse d4af7bec9f
Remove cell_test.py from the blacklist of tf.compat.v1. (#1651) 2020-04-12 21:29:23 -04:00
Gabriel de Marmiesse e2d4859c3f
Removed some elements from the deprecated_v1 blacklist. (#1636) 2020-04-10 10:27:05 -04:00
Gabriel de Marmiesse 4da6ec48be
Fixed the codeowners file. (#1607)
* Fixed the codeowners file.
2020-04-09 12:58:54 -04:00
Gabriel de Marmiesse 03e07d13ff
Fix master branch (#1601)
* Remove the need to declare optimizers source files in BUILD.

* Remove the need to declare source files of tfa and utils in BUILD.

* Adapt blacklist.
2020-04-07 08:14:48 -04:00
Gabriel de Marmiesse 767efc1a0e
Add checks for code quality: usage of tf.compat.v1 and experimental APIs (#1544)
* Add checks for code quality.

* Refactoring.
2020-04-06 21:25:49 -04:00
Gabriel de Marmiesse 2ed801d43c
Added a minimal check to ensure we don't use tf private API. (#1507)
* Added a minimal check to ensure we don't use tf private API.

* Group tests together.

* Run pytest on the directory.

* Group stuff together.

* Remove no-deps.

* Change the path in contributing.
2020-04-01 19:05:16 -04:00