We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc4f9f5 commit 29d9b46Copy full SHA for 29d9b46
tensorflow/python/training/saver.py
@@ -550,8 +550,12 @@ def _GroupByDevices(self, saveables):
550
"""
551
per_device = collections.defaultdict(lambda: [])
552
for saveable in saveables:
553
- canonical_device = set(
554
- pydev.canonical_name(spec.tensor.device) for spec in saveable.specs)
+ canonical_device = set()
+ for spec in saveable.specs:
555
+ device_name = pydev.canonical_name(spec.tensor.device)
556
+ device_spec = pydev.DeviceSpec.from_string(device_name)
557
+ device_spec.device_type = "CPU"
558
+ canonical_device.add(device_spec.to_string())
559
if len(canonical_device) != 1:
560
raise ValueError("All tensors of a saveable object must be "
561
"on the same device: %s" % saveable.name)
0 commit comments