Return a slot named `name` created for `var` by the Optimizer. Some `Optimizer` subclasses use additional variables. For example `Momentum` and `Adagrad` use variables to accumulate updates. This method gives access to these `Variable` objects if for some reason you need them. Us
(self, var, name)
| 1017 | return apply_updates |
| 1018 | |
| 1019 | def get_slot(self, var, name): |
| 1020 | """Return a slot named `name` created for `var` by the Optimizer. |
| 1021 | |
| 1022 | Some `Optimizer` subclasses use additional variables. For example |
| 1023 | `Momentum` and `Adagrad` use variables to accumulate updates. This method |
| 1024 | gives access to these `Variable` objects if for some reason you need them. |
| 1025 | |
| 1026 | Use `get_slot_names()` to get the list of slot names created by the |
| 1027 | `Optimizer`. |
| 1028 | |
| 1029 | Args: |
| 1030 | var: A variable passed to `minimize()` or `apply_gradients()`. |
| 1031 | name: A string. |
| 1032 | |
| 1033 | Returns: |
| 1034 | The `Variable` for the slot if it was created, `None` otherwise. |
| 1035 | """ |
| 1036 | state = self._get_state_for_var(var) |
| 1037 | return state.get_slot(var, name) if state is not None else None |
| 1038 | |
| 1039 | def get_slot_names(self): |
| 1040 | """Return a list of the names of slots created by the `Optimizer`. |