(self, *args, **kwargs)
| 228 | return tuple(flattened_shapes) |
| 229 | |
| 230 | def get_graph(self, *args, **kwargs): |
| 231 | if self._cache is None: |
| 232 | self._cache = LRUCache(self._cache_size) |
| 233 | |
| 234 | cache_key = hash(self.gen_key(*args, **kwargs)) |
| 235 | graph = self._cache.get(cache_key) |
| 236 | |
| 237 | # Create graph |
| 238 | if graph is None: |
| 239 | self._base_graph._print( |
| 240 | 0, |
| 241 | 0, |
| 242 | self._base_graph._shallow_repr() |
| 243 | + " got a new input shape, is compiling a new graph.", |
| 244 | ) |
| 245 | graph = self._init_and_get_a_graph_in_cache(cache_key) |
| 246 | |
| 247 | return graph |
no test coverage detected