Explicitly specify the value of all the attributes for the newly created Assign
authorBenoit Steiner <bsteiner@google.com>
Tue, 6 Feb 2018 18:11:26 +0000 (10:11 -0800)
committerTensorFlower Gardener <gardener@tensorflow.org>
Tue, 6 Feb 2018 18:15:19 +0000 (10:15 -0800)
nodes since we can't always rely on TF calling AddDefaultAttrsToGraphDef.

PiperOrigin-RevId: 184698463

tensorflow/core/grappler/optimizers/memory_optimizer.cc

index be18e7d6f01ca4c5cbabb9099685fa7b8efeb1e3..9f3e94052f8289f575abdc6326cf2ee31749a8e6 100644 (file)
@@ -641,6 +641,8 @@ bool SchedulingPass(Cluster* cluster, GrapplerItem* item) {
     initialize->set_op("Assign");
     initialize->set_device(device);
     (*initialize->mutable_attr())["T"].set_type(dtype);
+    (*initialize->mutable_attr())["use_locking"].set_b(false);
+    (*initialize->mutable_attr())["validate_shape"].set_b(false);
     *initialize->add_input() = tmp_var->name();
     *initialize->add_input() = zeros->name();