eager: Tweak error message.
authorAsim Shankar <ashankar@google.com>
Mon, 2 Apr 2018 19:58:52 +0000 (12:58 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Mon, 2 Apr 2018 20:01:11 +0000 (13:01 -0700)
Motivated by
https://stackoverflow.com/questions/49616532/a-tensorflow-eager-gpu-error/49617069

PiperOrigin-RevId: 191334050

tensorflow/c/eager/c_api.cc

index bb1492f..c96a38d 100644 (file)
@@ -496,9 +496,11 @@ tensorflow::Status ValidateInputTypeAndPlacement(
               expected_device->name(), " but is actually on ",
               actual_device->name(), " (operation running on ",
               op_device->name(), ")",
-              " Tensors can be copied explicitly using .gpu() or .cpu(),"
-              " or transparently copied by using tfe.enable_eager_execution("
-              "tfe.DEVICE_PLACEMENT_SILENT). Copying tensors between devices"
+              " Tensors can be copied explicitly using .gpu() or .cpu() "
+              "methods,"
+              " or transparently copied by using tf.enable_eager_execution("
+              "device_policy=tfe.DEVICE_PLACEMENT_SILENT). Copying tensors "
+              "between devices"
               " may slow down your model");
         case tensorflow::DEVICE_PLACEMENT_WARN:
           LOG(WARNING) << "before computing " << op->name << " input #" << i