diff --git a/CHANGELOG.md b/CHANGELOG.md index f45ee9dff..67ced0956 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -106,9 +106,10 @@ To release a new version, please update the changelog as followed: ### Fixed - Fix `tf.models.Model._construct_graph` for list of outputs, e.g. STN case (PR #1010) -- Enable better `in_channels` exception raise. (pR #1015) +- Enable better `in_channels` exception raise. (PR #1015) - Set allow_pickle=True in np.load() (#PR 1021) - Remove `private_method` decorator (#PR 1025) +- Copy original model's `trainable_weights` and `nontrainable_weights` when initializing `ModelLayer` (#PR 1026) ### Removed @@ -118,7 +119,7 @@ To release a new version, please update the changelog as followed: - @zsdonghao - @ChrisWu1997: #1010 #1015 #1025 -- @warshallrho: #1017 #1021 +- @warshallrho: #1017 #1021 #1026 - @ArnoldLIULJ: #1023 - @JingqingZ: #1023 diff --git a/tensorlayer/layers/core.py b/tensorlayer/layers/core.py index 30fc0e3f3..8ea641d03 100644 --- a/tensorlayer/layers/core.py +++ b/tensorlayer/layers/core.py @@ -512,6 +512,8 @@ def __init__(self, model, name=None): # Layer weight state self._all_weights = model.all_weights + self._trainable_weights = model.trainable_weights + self._nontrainable_weights = model.nontrainable_weights # Layer training state self.is_train = True