MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / MakeWrite

Function MakeWrite

tensorflow/compiler/jit/mark_for_compilation_pass_test.cc:660–668  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

658}
659
660Node* MakeWrite(const Scope& scope, const string& id) {
661 Output var_handle =
662 ops::VarHandleOp(scope.WithOpName("Var" + id), DT_FLOAT, TensorShape({}));
663 Output value_to_write =
664 ops::Const(scope.WithOpName("ValueToAssign" + id), 1.0f);
665 ops::AssignVariableOp assign_op(scope.WithOpName("Assignment" + id),
666 var_handle, value_to_write);
667 return assign_op.operation.node();
668}
669
670Node* MakeNeutral(const Scope& scope, const string& id) {
671 return ops::Const(scope.WithOpName("Const" + id), 42.0f).node();

Callers 1

TESTFunction · 0.70

Calls 5

WithOpNameMethod · 0.80
ConstFunction · 0.70
VarHandleOpClass · 0.50
TensorShapeClass · 0.50
nodeMethod · 0.45

Tested by

no test coverage detected