Returns a dict for caching slots created under the given name. Args: slot_name: Name for the slot. Returns: A dict that maps primary `Variable` objects to the slot created for that variable, under the given slot name.
(self, slot_name)
| 1271 | # -------------- |
| 1272 | |
| 1273 | def _slot_dict(self, slot_name): |
| 1274 | """Returns a dict for caching slots created under the given name. |
| 1275 | |
| 1276 | Args: |
| 1277 | slot_name: Name for the slot. |
| 1278 | |
| 1279 | Returns: |
| 1280 | A dict that maps primary `Variable` objects to the slot created |
| 1281 | for that variable, under the given slot name. |
| 1282 | """ |
| 1283 | named_slots = self._slots.get(slot_name, None) |
| 1284 | if named_slots is None: |
| 1285 | named_slots = {} |
| 1286 | self._slots[slot_name] = named_slots |
| 1287 | return named_slots |
| 1288 | |
| 1289 | def _get_or_make_slot(self, var, val, slot_name, op_name, slot_config=None): |
| 1290 | """Find or create a slot for a variable. |
no test coverage detected