(kwargs)
| 23 | |
| 24 | |
| 25 | def _replace_global_by_local(kwargs): |
| 26 | if 'collections' in kwargs: |
| 27 | collections = kwargs['collections'] |
| 28 | if not collections: |
| 29 | collections = {tfv1.GraphKeys.GLOBAL_VARIABLES} |
| 30 | else: |
| 31 | collections = set(collections.copy()) |
| 32 | collections.remove(tfv1.GraphKeys.GLOBAL_VARIABLES) |
| 33 | collections.add(tfv1.GraphKeys.LOCAL_VARIABLES) |
| 34 | kwargs['collections'] = list(collections) |
| 35 | |
| 36 | |
| 37 | _module_lock = threading.Lock() |
no test coverage detected