Calls and returns the load ops for each embedding table. Returns: A list of ops to load embedding and slot variables from CPU to TPU.
()
| 817 | retrieve_op_fns.append(retrieve_ops_fn) |
| 818 | |
| 819 | def load_ops(): |
| 820 | """Calls and returns the load ops for each embedding table. |
| 821 | |
| 822 | Returns: |
| 823 | A list of ops to load embedding and slot variables from CPU to TPU. |
| 824 | """ |
| 825 | load_ops_list = [] |
| 826 | for load_op_fn in load_op_fns: |
| 827 | load_ops_list.extend(load_op_fn()) |
| 828 | return load_ops_list |
| 829 | |
| 830 | def retrieve_ops(): |
| 831 | """Calls and returns the retrieve ops for each embedding table. |