Commit e0f8b4ce authored by Allen Lavoie's avatar Allen Lavoie Committed by TensorFlower Gardener
Browse files

Switch RNN and Wrapper to use standard Layer sub-Layer tracking

The "states" property needs an opt-out so it doesn't catch states which are Variables. And Layer.__setattr__ in general will now ignore @property.setters when tracking, on the assumption that the setter itself will assign to something (or as in this case disable tracking).

There's also an odd issue with isinstance(obj, list) that only showed up in the Python 3.4 presubmit. It may be a 3.4-specific issue, since ListWrapper passes isinstance(ListWrapper(), list) in Python 3.6. For now I've used collections.Sequence which is slightly better anyway.

PiperOrigin-RevId: 236189545
parent f929a5db
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment