diff options
author | 2017-10-18 16:25:56 -0700 | |
---|---|---|
committer | 2017-10-18 16:30:30 -0700 | |
commit | bba3957467ad8ba9351b829036120412d5d006cb (patch) | |
tree | 73796fd844d5d4da1a2b673caa574094e9075cd3 /tensorflow/python/framework/constant_op.py | |
parent | 2b91b812ef50384cd0526ea513f1cf585adb6ef7 (diff) |
Replace as_gpu_tensor and as_cpu_tensor to gpu and cpu
PiperOrigin-RevId: 172673720
Diffstat (limited to 'tensorflow/python/framework/constant_op.py')
-rw-r--r-- | tensorflow/python/framework/constant_op.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/python/framework/constant_op.py b/tensorflow/python/framework/constant_op.py index 686f5aa6db..34848af53b 100644 --- a/tensorflow/python/framework/constant_op.py +++ b/tensorflow/python/framework/constant_op.py @@ -195,7 +195,7 @@ def constant(value, dtype=None, shape=None, name="Const", verify_shape=False): # We don't have a Fill kernel for bool dtype on GPU. So we first run # Fill on CPU and then copy to GPU if needed. with ops.device("/device:CPU:0"): - x = _eager_fill(shape.as_list(), t.as_cpu_tensor(), ctx) + x = _eager_fill(shape.as_list(), t.cpu(), ctx) return _eager_identity(x, ctx) else: return _eager_fill(shape.as_list(), t, ctx) |