Sequence of variables owned by this module and it's submodules. Note: this method uses reflection to find variables on the current instance and submodules. For performance reasons you may wish to cache the result of calling this method if you don't expect the return value to change.
(self)
| 156 | |
| 157 | @property |
| 158 | def trainable_variables(self): |
| 159 | """Sequence of variables owned by this module and it's submodules. |
| 160 | |
| 161 | Note: this method uses reflection to find variables on the current instance |
| 162 | and submodules. For performance reasons you may wish to cache the result |
| 163 | of calling this method if you don't expect the return value to change. |
| 164 | |
| 165 | Returns: |
| 166 | A sequence of variables for the current module (sorted by attribute |
| 167 | name) followed by variables from all submodules recursively (breadth |
| 168 | first). |
| 169 | """ |
| 170 | return tuple(self._flatten(predicate=_is_trainable_variable)) |
| 171 | |
| 172 | @property |
| 173 | def submodules(self): |