Returns a blob name that will be unique to the current device and optimizer instance.
(self, base_str)
| 97 | self._use_dedicated_lr_iteration_counter = val |
| 98 | |
| 99 | def make_unique_blob_name(self, base_str): |
| 100 | """ |
| 101 | Returns a blob name that will be unique to the current device |
| 102 | and optimizer instance. |
| 103 | """ |
| 104 | current_scope = scope.CurrentDeviceScope() |
| 105 | if current_scope is None: |
| 106 | return self.get_cpu_blob_name(base_str) |
| 107 | |
| 108 | if core.IsGPUDeviceType(current_scope.device_type): |
| 109 | return self.get_gpu_blob_name( |
| 110 | base_str, current_scope.device_id, current_scope.node_name |
| 111 | ) |
| 112 | else: |
| 113 | return self.get_cpu_blob_name(base_str, current_scope.node_name) |
| 114 | |
| 115 | def build_lr( |
| 116 | self, |