/external/tensorflow/tensorflow/compiler/tf2xla/ |
D | functionalize_control_flow_test.cc | 70 auto x = ops::Placeholder(scope.WithOpName("x"), DT_INT32); in TEST() 71 auto y = ops::Placeholder(scope.WithOpName("y"), DT_INT32); in TEST() 72 auto less = ops::Less(scope.WithOpName("cond/Less"), y, x); in TEST() 73 auto switch_1 = ops::Switch(scope.WithOpName("cond/Switch"), less, less); in TEST() 76 ops::Identity(scope.WithOpName("cond/Identity"), switch_1.output_true); in TEST() 78 scope.WithOpName("cond").WithControlDependencies(identity_t), 17); in TEST() 79 auto switch_2 = ops::Switch(scope.WithOpName("cond/Switch"), y, less); in TEST() 80 auto mul = ops::Multiply(scope.WithOpName("cond/Mul"), switch_2.output_true, in TEST() 84 ops::Identity(scope.WithOpName("cond/Identity"), switch_1.output_false); in TEST() 86 scope.WithOpName("cond").WithControlDependencies(identity_f), 23); in TEST() [all …]
|
/external/tensorflow/tensorflow/compiler/jit/ |
D | encapsulate_xla_computations_pass_test.cc | 40 auto a = ops::Placeholder(scope.WithOpName("A"), DT_INT32); in MakeOuterGraph() 41 auto b = ops::Placeholder(scope.WithOpName("B"), DT_FLOAT); in MakeOuterGraph() 42 auto c = ops::Placeholder(scope.WithOpName("C"), DT_INT32); in MakeOuterGraph() 43 auto d = ops::Placeholder(scope.WithOpName("D"), DT_FLOAT); in MakeOuterGraph() 44 auto u = ops::Placeholder(scope.WithOpName("U"), DT_RESOURCE); in MakeOuterGraph() 45 auto v = ops::Placeholder(scope.WithOpName("V"), DT_RESOURCE); in MakeOuterGraph() 46 auto w = ops::Placeholder(scope.WithOpName("W"), DT_RESOURCE); in MakeOuterGraph() 76 ops::XlaClusterOutput(scope.WithOpName("Out0"), Output(launch, 0)); in MakeOuterGraph() 78 ops::XlaClusterOutput(scope.WithOpName("Out1"), Output(launch, 1)); in MakeOuterGraph() 80 ops::XlaClusterOutput(scope.WithOpName("Out2"), Output(launch, 2)); in MakeOuterGraph() [all …]
|
D | deadness_analysis_test.cc | 50 Output value = ops::Placeholder(root.WithOpName(prefix + "/value"), DT_FLOAT); in CreateSwitch() 52 ops::Placeholder(root.WithOpName(prefix + "/pred"), DT_BOOL); in CreateSwitch() 53 return ops::Switch(root.WithOpName(prefix + "/switch"), value, predicate); in CreateSwitch() 119 root.WithOpName(prefix + "/enter"), initial_value, frame_name); in CreateInductionVariable() 121 ops::Merge iv(root.WithOpName(prefix + "/iv"), in CreateInductionVariable() 123 Output increment_by = ops::Const(root.WithOpName(prefix + "/incr"), 1); in CreateInductionVariable() 124 Output final_value = ops::Const(root.WithOpName(prefix + "/final"), 10); in CreateInductionVariable() 126 ops::Less(root.WithOpName(prefix + "/cond"), iv.output, final_value); in CreateInductionVariable() 127 ops::Switch latch(root.WithOpName(prefix + "/latch"), iv.output, in CreateInductionVariable() 129 ops::internal::Exit exit(root.WithOpName(prefix + "/exit"), in CreateInductionVariable() [all …]
|
D | shape_inference_test.cc | 36 auto a = ops::Placeholder(root.WithOpName("A"), DT_FLOAT, in TEST() 38 auto b = ops::Placeholder(root.WithOpName("B"), DT_FLOAT, in TEST() 40 auto c = ops::Placeholder(root.WithOpName("C"), DT_FLOAT); in TEST() 41 auto d = ops::Add(root.WithOpName("D"), a, b); in TEST() 42 auto e = ops::Add(root.WithOpName("E"), d, c); in TEST() 43 auto f = ops::Neg(root.WithOpName("F"), e); in TEST() 44 auto g = ops::AddN(root.WithOpName("G"), std::initializer_list<Output>{e, f}); in TEST() 70 auto dummy = ops::Placeholder(scope.WithOpName("Dummy"), DT_INT32, in TEST() 73 auto source = ops::Placeholder(scope.WithOpName("source"), DT_INT32, in TEST() 76 ops::internal::Enter(scope.WithOpName("while/Enter"), source, "aloop"); in TEST() [all …]
|
D | increase_dynamism_for_auto_jit_pass_test.cc | 106 Output input = ops::Placeholder(root.WithOpName("input"), DT_FLOAT); in TEST() 107 Output begin = ops::Placeholder(root.WithOpName("begin"), DT_INT32); in TEST() 108 Output size = ops::Const(root.WithOpName("size"), {-1, 500}); in TEST() 109 Output slice = ops::Slice(root.WithOpName("slice"), input, begin, size); in TEST() 152 Output input = ops::Placeholder(root.WithOpName("input"), DT_FLOAT); in TEST() 153 Output begin = ops::Placeholder(root.WithOpName("begin"), DT_INT32); in TEST() 154 Output size = ops::Const(root.WithOpName("size"), {-1}); in TEST() 155 Output slice = ops::Slice(root.WithOpName("slice"), input, begin, size); in TEST() 172 Output input = ops::Placeholder(root.WithOpName("input"), DT_FLOAT); in TEST() 173 Output begin = ops::Placeholder(root.WithOpName("begin"), DT_INT32); in TEST() [all …]
|
D | clone_constants_for_better_clustering_test.cc | 68 Output in0 = ops::Placeholder(on_gpu.WithOpName("in0"), DT_FLOAT); in TEST() 69 Output in1 = ops::Placeholder(on_gpu.WithOpName("in1"), DT_FLOAT); in TEST() 71 Output perm = ops::Const(on_cpu.WithOpName("perm"), {3, 1, 2, 0}); in TEST() 74 Output tr0 = ops::Transpose(on_gpu.WithOpName("tr0"), in0, perm); in TEST() 75 Output tr1 = ops::Transpose(on_gpu.WithOpName("tr1"), in1, perm); in TEST() 94 Output in0 = ops::Placeholder(on_gpu.WithOpName("in0"), DT_FLOAT); in TEST() 95 Output in1 = ops::Placeholder(on_gpu.WithOpName("in1"), DT_FLOAT); in TEST() 97 Output perm = ops::Const(on_gpu.WithOpName("perm"), {3, 1, 2, 0}); in TEST() 100 Output tr0 = ops::Transpose(on_gpu.WithOpName("tr0"), in0, perm); in TEST() 101 Output tr1 = ops::Transpose(on_gpu.WithOpName("tr1"), in1, perm); in TEST() [all …]
|
D | mark_for_compilation_pass_test.cc | 361 auto a = ops::Placeholder(root.WithOpName("A"), DT_FLOAT); in TEST() 362 auto b = ops::Placeholder(root.WithOpName("B"), DT_FLOAT); in TEST() 363 auto c = ops::Add(root.WithOpName("C"), a, b); in TEST() 367 auto d = ops::Add(root.WithOpName("D"), c, exit); in TEST() 522 ops::VarHandleOp(scope.WithOpName("Var" + id), DT_FLOAT, TensorShape({})); in MakeRead() 524 ops::ReadVariableOp(scope.WithOpName("Read" + id), var_handle, DT_FLOAT); in MakeRead() 533 ops::VarHandleOp(scope.WithOpName("Var" + id), DT_FLOAT, TensorShape({})); in MakeWrite() 535 ops::Const(scope.WithOpName("ValueToAssign" + id), 1.0f); in MakeWrite() 536 ops::AssignVariableOp assign_op(scope.WithOpName("Assignment" + id), in MakeWrite() 542 return ops::Const(scope.WithOpName("Const" + id), 42.0f).node(); in MakeNeutral() [all …]
|
/external/tensorflow/tensorflow/core/common_runtime/ |
D | function_test.cc | 694 auto arg = ops::_Arg(s.WithOpName("x"), DT_FLOAT, 0); in TEST_F() 697 auto ret = ops::_Retval(s.WithOpName("y_RetVal"), b, 0); in TEST_F() 710 auto x = ops::_Arg(s.WithOpName("x"), DT_FLOAT, 0); in TEST_F() 711 auto func0 = ops::Identity(s.WithOpName("Func/x4/input/_0"), x); in TEST_F() 714 auto func1 = ops::Identity(s.WithOpName("Func/x4/output/_1"), x4_y); in TEST_F() 715 auto func2 = ops::Identity(s.WithOpName("Func/y/input/_2"), func1); in TEST_F() 718 auto func3 = ops::Identity(s.WithOpName("Func/y/output/_3"), y_y); in TEST_F() 719 auto ret = ops::_Retval(s.WithOpName("y_RetVal"), func3, 0); in TEST_F() 732 auto x = ops::_Arg(s.WithOpName("x"), DT_FLOAT, 0); in TEST_F() 733 auto x4_x2_two = ops::Const<int64>(s.WithOpName("x4/x2/two"), 2LL); in TEST_F() [all …]
|
/external/tensorflow/tensorflow/tools/graph_transforms/ |
D | quantize_nodes_test.cc | 164 return Const(root.WithOpName(name), Input::Initializer(tensor)); in TestIgnoreOps() 175 Output mat_mul_op = MatMul(root.WithOpName("mat_mul_op"), a_op, b_op); in TestIgnoreOps() 176 Output mul_op = Mul(root.WithOpName("mul"), c_op, d_op); in TestIgnoreOps() 215 Output a_op = Const(root.WithOpName("a_op"), Input::Initializer(a_tensor)); in TestQuantizeMatMul() 219 Output b_op = Const(root.WithOpName("b_op"), Input::Initializer(b_tensor)); in TestQuantizeMatMul() 221 Output mat_mul_op = MatMul(root.WithOpName("mat_mul_op"), a_op, b_op); in TestQuantizeMatMul() 266 Output x = Const(root.WithOpName("x"), Input::Initializer(x_float_tensor)); in TestQuantizeMul() 270 Output y = Const(root.WithOpName("y"), Input::Initializer(y_float_tensor)); in TestQuantizeMul() 272 Mul mul = Mul(root.WithOpName("mul"), x, y); in TestQuantizeMul() 301 Output x = Const(root.WithOpName("x"), Input::Initializer(x_float_tensor)); in TestQuantizeAdd() [all …]
|
D | fold_constants_test.cc | 55 Const(root.WithOpName("a_expect_removed"), Input::Initializer(a_data)); in TestSimpleAdd() 60 Const(root.WithOpName("b_expect_removed"), Input::Initializer(b_data)); in TestSimpleAdd() 62 Output add = Add(root.WithOpName("add_expect_removed"), a_const, b_const); in TestSimpleAdd() 65 Placeholder(root.WithOpName("placeholder_expect_remains"), DT_FLOAT); in TestSimpleAdd() 68 Mul(root.WithOpName("output_expect_remains"), add, placeholder); in TestSimpleAdd() 92 Const(root.WithOpName("a_expect_remains"), Input::Initializer(a_data)); in TestOpExclusionAdd() 97 Const(root.WithOpName("b_expect_remains"), Input::Initializer(b_data)); in TestOpExclusionAdd() 99 Output add = Add(root.WithOpName("add_expect_remains"), a_const, b_const); in TestOpExclusionAdd() 102 Placeholder(root.WithOpName("placeholder_expect_remains"), DT_FLOAT); in TestOpExclusionAdd() 105 Mul(root.WithOpName("output_expect_remains"), add, placeholder); in TestOpExclusionAdd() [all …]
|
D | fold_old_batch_norms_test.cc | 49 Const(root.WithOpName("input_op"), Input::Initializer(input_data)); in TestFoldOldBatchNorms() 55 Const(root.WithOpName("weights_op"), Input::Initializer(weights_data)); in TestFoldOldBatchNorms() 57 Output conv_op = Conv2D(root.WithOpName("conv_op"), input_op, weights_op, in TestFoldOldBatchNorms() 63 Const(root.WithOpName("mean_op"), Input::Initializer(mean_data)); in TestFoldOldBatchNorms() 67 Output variance_op = Const(root.WithOpName("variance_op"), in TestFoldOldBatchNorms() 73 Const(root.WithOpName("beta_op"), Input::Initializer(beta_data)); in TestFoldOldBatchNorms() 78 Const(root.WithOpName("gamma_op"), Input::Initializer(gamma_data)); in TestFoldOldBatchNorms() 133 Const(root.WithOpName("input_op"), Input::Initializer(input_data)); in TestFoldOldBatchNormsAfterDepthwiseConv2dNative() 139 Const(root.WithOpName("weights_op"), Input::Initializer(weights_data)); in TestFoldOldBatchNormsAfterDepthwiseConv2dNative() 141 Output conv_op = DepthwiseConv2dNative(root.WithOpName("conv_op"), input_op, in TestFoldOldBatchNormsAfterDepthwiseConv2dNative() [all …]
|
/external/tensorflow/tensorflow/core/grappler/optimizers/ |
D | dependency_optimizer_test.cc | 67 Output x = ops::Const(s.WithOpName("x"), {1.0f, 2.0f}, {1, 2}); in TEST_F() 68 Output y = ops::Const(s.WithOpName("y"), {1.0f, 2.0f}, {1, 2}); in TEST_F() 69 Output z = ops::Const(s.WithOpName("z"), {1.0f, 2.0f}, {1, 2}); in TEST_F() 70 Output add = ops::Add(s.WithOpName("add"), x, y); in TEST_F() 72 ops::Identity(s.WithOpName("id1").WithControlDependencies(x), add); in TEST_F() 74 s.WithOpName("id2").WithControlDependencies(y).WithControlDependencies(z), in TEST_F() 104 Output x = ops::RandomUniform(s.WithOpName("x"), {1, 2}, DT_FLOAT); in TEST_F() 105 Output y = ops::RandomUniform(s.WithOpName("y"), {1, 2}, DT_FLOAT); in TEST_F() 106 Output add = ops::Add(s.WithOpName("add"), x, y); in TEST_F() 108 ops::Identity(s.WithOpName("id1").WithControlDependencies(add), x); in TEST_F() [all …]
|
D | arithmetic_optimizer_test.cc | 105 Output c1 = ops::Const(s.WithOpName("c1"), {3.14, 2.7}, {1, 2}); in TEST_F() 106 Output c2 = ops::Const(s.WithOpName("c2"), {3.14, 2.7}, {1, 2}); in TEST_F() 107 Output div = ops::Div(s.WithOpName("div"), c1, c2); in TEST_F() 137 Output c = ops::Const(s.WithOpName("c"), {3.14, 2.7}, {1, 2}); in TEST_F() 138 auto check1 = ops::CheckNumerics(s.WithOpName("check1"), c, "foo"); in TEST_F() 139 auto check2 = ops::CheckNumerics(s.WithOpName("check2"), c, "foo"); in TEST_F() 140 auto assert1 = ops::Assert(s.WithOpName("assert1"), p, {c}); in TEST_F() 141 auto assert2 = ops::Assert(s.WithOpName("assert2"), p, {c}); in TEST_F() 142 Output div = ops::Div(s.WithOpName("div").WithControlDependencies( in TEST_F() 176 Output c1 = ops::Const(s.WithOpName("c1"), {1.0f, 2.0f}, {1, 2}); in TEST_F() [all …]
|
D | constant_folding_test.cc | 42 Output x = ops::Placeholder(s.WithOpName("x"), DTYPE, in SimpleNeutralElementTest() 44 Output v = ops::Variable(s.WithOpName("v"), {2, 2}, DTYPE); in SimpleNeutralElementTest() 53 Output zeros = ops::Const(s.WithOpName("zeros"), zeros_t); in SimpleNeutralElementTest() 54 Output ones = ops::Const(s.WithOpName("ones"), ones_t); in SimpleNeutralElementTest() 60 mul1 = ops::LogicalAnd(s.WithOpName("mul1"), x, zeros); in SimpleNeutralElementTest() 61 mul2 = ops::LogicalAnd(s.WithOpName("mul2"), x, ones); in SimpleNeutralElementTest() 62 add1 = ops::LogicalOr(s.WithOpName("add1"), x, zeros); in SimpleNeutralElementTest() 63 add2 = ops::LogicalOr(s.WithOpName("add2"), x, ones); in SimpleNeutralElementTest() 65 mul1 = ops::Mul(s.WithOpName("mul1"), x, zeros); in SimpleNeutralElementTest() 66 mul2 = ops::Mul(s.WithOpName("mul2"), x, ones); in SimpleNeutralElementTest() [all …]
|
D | memory_optimizer_test.cc | 45 Output a = ops::Variable(s.WithOpName("a"), {2, 3, 4}, DT_FLOAT); in TEST_F() 46 Output b = ops::Identity(s.WithOpName("b"), a); // Recomputed in TEST_F() 47 Output c = ops::Identity(s.WithOpName("c"), b); in TEST_F() 48 Output d = ops::AddN(s.WithOpName("gradients/d"), {c}); in TEST_F() 49 Output e = ops::AddN(s.WithOpName("gradients/e"), {d, b}); in TEST_F() 50 Output f = ops::AddN(s.WithOpName("gradients/f"), {e, a}); in TEST_F() 83 Output a = ops::Variable(s.WithOpName("a"), {2, 3, 4}, DT_FLOAT); in TEST_F() 84 Output b = ops::Identity(s.WithOpName("b"), a); // Would be recomputed, but in TEST_F() 86 Output c = ops::Identity(s.WithOpName("c"), b); in TEST_F() 87 Output d = ops::AddN(s.WithOpName("gradients/d"), {c}); in TEST_F() [all …]
|
D | layout_optimizer_test.cc | 75 ops::Const(s->WithOpName("Input"), Input::Initializer(input_data)); in SimpleConv2D() 82 ops::Const(s->WithOpName("Filter"), Input::Initializer(filter_data)); in SimpleConv2D() 89 Output conv = ops::Conv2D(s->WithOpName("Conv2D").WithDevice(device), input, in SimpleConv2D() 136 ops::Const(s->WithOpName("InputSizes"), Input::Initializer(input_data)); in SimpleConv2DBackpropInput() 141 ops::Variable(s->WithOpName("Filter"), filter_shape, DT_FLOAT); in SimpleConv2DBackpropInput() 148 ops::Const(s->WithOpName("Output"), Input::Initializer(output_data)); in SimpleConv2DBackpropInput() 152 ops::Identity(s->WithOpName("InputSizesIdentity"), input_sizes); in SimpleConv2DBackpropInput() 170 s->WithOpName("Conv2DBackpropInput"), input_sizes, filter, output, in SimpleConv2DBackpropInput() 174 s->WithOpName("Conv2DBackpropInput"), input_sizes_i, filter, output, in SimpleConv2DBackpropInput() 198 Output x = ops::Const(s->WithOpName("Input"), Input::Initializer(data)); in SimpleFusedBatchNormGrad() [all …]
|
D | remapper_test.cc | 41 Output dflt = ops::Const(s.WithOpName("dflt"), {3.14f, 2.7f}, {2, 1, 1, 1}); in TEST_F() 42 Output x = ops::PlaceholderWithDefault(s.WithOpName("x"), dflt, {2, 1, 1, 1}); in TEST_F() 43 Output scale = ops::Const(s.WithOpName("scale"), {0.3f}, {1}); in TEST_F() 44 Output offset = ops::Const(s.WithOpName("offset"), {0.123f}, {1}); in TEST_F() 45 Output mean = ops::Const(s.WithOpName("mean"), {7.3f}, {1}); in TEST_F() 46 Output variance = ops::Const(s.WithOpName("variance"), {0.57f}, {1}); in TEST_F() 49 ops::FusedBatchNorm bn(s.WithOpName("batch_norm"), x, scale, offset, mean, in TEST_F() 71 ops::Const(s.WithOpName("dflt"), {3.14f, 2.7f, 1.0f, 2.0f, 3.0f, 100.0f}, in TEST_F() 73 Output x = ops::PlaceholderWithDefault(s.WithOpName("x"), dflt, {1, 3, 1, 2}); in TEST_F() 74 Output scale = ops::Const(s.WithOpName("scale"), {0.3f, 7.0f, 123.0f}, {3}); in TEST_F() [all …]
|
D | model_pruner_test.cc | 63 Output a = ops::Const(s.WithOpName("a"), 0.0f, {10, 10}); in TEST_F() 64 Output b = ops::Sqrt(s.WithOpName("b"), {a}); in TEST_F() 65 Output c = ops::StopGradient(s.WithOpName("c"), b); in TEST_F() 66 Output d = ops::StopGradient(s.WithOpName("d"), c); in TEST_F() 67 Output e = ops::Sqrt(s.WithOpName("e"), {d}); in TEST_F() 106 Output a = ops::Const(s.WithOpName("a"), 0.0f, {10, 10}); in TEST_F() 107 Output b = ops::Sqrt(s.WithOpName("b"), {a}); in TEST_F() 108 Output c = ops::Identity(s.WithOpName("c"), b); in TEST_F() 109 Output d = ops::Identity(s.WithOpName("d"), c); in TEST_F() 110 Output e = ops::Sqrt(s.WithOpName("e"), {d}); in TEST_F() [all …]
|
/external/tensorflow/tensorflow/core/graph/ |
D | graph_partition_test.cc | 241 auto a1 = FloatInput(in_.WithOpName("A1")); in TEST_F() 242 Combine(in_.WithOpName("A2"), a1, a1); in TEST_F() 247 a1 = FloatInput(scope_a_.WithOpName("A1")); in TEST_F() 248 Combine(scope_a_.WithOpName("A2"), a1, a1); in TEST_F() 253 auto a1 = FloatInput(in_.WithOpName("A1")); in TEST_F() 254 auto b1 = FloatInput(in_.WithOpName("B1")); in TEST_F() 255 Combine(in_.WithOpName("B2"), a1, b1); in TEST_F() 262 a1 = FloatInput(scope_a_.WithOpName("A1")); in TEST_F() 263 _Send(scope_a_.WithOpName("A1/_0"), a1, "edge_1_A1", a, 82, b); in TEST_F() 266 b1 = FloatInput(scope_b_.WithOpName("B1")); in TEST_F() [all …]
|
/external/tensorflow/tensorflow/compiler/tf2tensorrt/segment/ |
D | segment_test.cc | 124 auto feed = ops::Placeholder(s.WithOpName("feed"), DT_FLOAT); in TEST_F() 125 auto add0 = ops::Add(s.WithOpName("add0"), feed, feed); in TEST_F() 126 auto add1 = ops::Add(s.WithOpName("add1"), feed, feed); in TEST_F() 127 auto add2 = ops::Add(s.WithOpName("add2"), add0, add1); in TEST_F() 128 auto add3 = ops::Add(s.WithOpName("add3"), add0, add2); in TEST_F() 129 auto add4 = ops::Add(s.WithOpName("add4"), add2, add2); in TEST_F() 171 auto feed = ops::Placeholder(s.WithOpName("feed"), DT_FLOAT); in TEST_F() 172 auto add0 = ops::Add(s.WithOpName("add0"), feed, feed); in TEST_F() 173 auto add1 = ops::Add(s.WithOpName("add1"), feed, feed); in TEST_F() 174 auto add2 = ops::Add(s.WithOpName("add2"), add0, add1); in TEST_F() [all …]
|
/external/tensorflow/tensorflow/core/grappler/utils/ |
D | grappler_test_test.cc | 31 auto s1_a = ops::Variable(s1.WithOpName("a"), {2, 2}, DT_FLOAT); in TEST_F() 32 auto s1_b = ops::Variable(s1.WithOpName("b"), {2, 2}, DT_FLOAT); in TEST_F() 33 auto s1_add = ops::Add(s1.WithOpName("Add_1"), s1_a, s1_b); in TEST_F() 36 auto s2_a = ops::Variable(s2.WithOpName("a"), {2, 2}, DT_FLOAT); in TEST_F() 37 auto s2_b = ops::Variable(s2.WithOpName("b"), {2, 2}, DT_FLOAT); in TEST_F() 38 auto s2_add = ops::Add(s2.WithOpName("Add_1"), s2_a, s2_b); in TEST_F() 52 auto a = ops::Variable(s.WithOpName("a"), {2, 2}, DT_FLOAT); in TEST_F() 53 auto b = ops::Variable(s.WithOpName("b"), {2, 2}, DT_FLOAT); in TEST_F() 54 auto add_1 = ops::Add(s.WithOpName("Add_1"), a, b); in TEST_F() 55 auto add_2 = ops::Add(s.WithOpName("Add_2"), add_1, b); in TEST_F() [all …]
|
/external/tensorflow/tensorflow/cc/tools/ |
D | freeze_saved_model_test.cc | 125 Output a = ops::Const(scope.WithOpName("a"), 10.0f, {}); in TestFreezeGraphWithoutDependentVariables() 126 Output b = ops::Const(scope.WithOpName("b"), 10.0f, {}); in TestFreezeGraphWithoutDependentVariables() 127 Output c = ops::Mul(scope.WithOpName("c"), a, b); in TestFreezeGraphWithoutDependentVariables() 130 ops::VarHandleOp(scope.WithOpName("var"), DataType::DT_FLOAT, {}); in TestFreezeGraphWithoutDependentVariables() 132 scope.WithOpName("var/Read/ReadVariableOp"), var, DataType::DT_FLOAT); in TestFreezeGraphWithoutDependentVariables() 133 auto assign = ops::AssignVariableOp(scope.WithOpName("assign"), var, a); in TestFreezeGraphWithoutDependentVariables() 136 ops::Variable(scope.WithOpName("var"), {}, DataType::DT_FLOAT); in TestFreezeGraphWithoutDependentVariables() 137 Output assign = ops::Assign(scope.WithOpName("assign"), var, a); in TestFreezeGraphWithoutDependentVariables() 153 Output expected_a = ops::Const(expected_scope.WithOpName("a"), 10.0f, {}); in TestFreezeGraphWithoutDependentVariables() 154 Output expected_b = ops::Const(expected_scope.WithOpName("b"), 10.0f, {}); in TestFreezeGraphWithoutDependentVariables() [all …]
|
/external/tensorflow/tensorflow/core/grappler/costs/ |
D | graph_properties_test.cc | 384 auto q1 = ops::FIFOQueue(root.WithOpName("Queue1"), {DataType::DT_FLOAT}); in TEST_F() 386 ops::QueueDequeue(root.WithOpName("Dequeue1"), q1, {DataType::DT_FLOAT}); in TEST_F() 401 auto q1 = ops::FIFOQueue(root.WithOpName("Queue1"), {DataType::DT_FLOAT}, in TEST_F() 404 ops::QueueDequeue(root.WithOpName("Dequeue1"), q1, {DataType::DT_FLOAT}); in TEST_F() 419 auto q1 = ops::FIFOQueue(root.WithOpName("Queue1"), {DataType::DT_FLOAT}, in TEST_F() 422 ops::QueueDequeue(root.WithOpName("Dequeue1"), q1, {DataType::DT_FLOAT}); in TEST_F() 440 auto q1 = ops::FIFOQueue(root.WithOpName("Queue1"), {DataType::DT_FLOAT}); in TEST_F() 442 ops::RandomNormal(root.WithOpName("rnd"), {3, 7}, DataType::DT_FLOAT); in TEST_F() 443 Output square1 = ops::Square(root.WithOpName("Square1"), rnd); in TEST_F() 444 auto enqueue1 = ops::QueueEnqueue(root.WithOpName("Enqueue1"), q1, {square1}); in TEST_F() [all …]
|
D | analytical_cost_estimator_test.cc | 60 s.WithOpName("image"), {batch, width, height, num_channels}, DT_FLOAT); in CreateMiniGraph() 61 auto labels = ops::RandomUniform(s.WithOpName("label"), {batch, num_labels}, in CreateMiniGraph() 64 s.WithOpName("W"), in CreateMiniGraph() 66 auto b = ops::Variable(s.WithOpName("B"), {conv_filters}, DT_FLOAT); in CreateMiniGraph() 68 ops::Conv2D(s.WithOpName("conv"), images, w, {1, 1, 1, 1}, "SAME"); in CreateMiniGraph() 69 auto bias = ops::Add(s.WithOpName("bias"), conv, b); in CreateMiniGraph() 70 auto relu = ops::Relu(s.WithOpName("relu"), bias); in CreateMiniGraph() 71 auto flat_shape = ops::Const(s.WithOpName("flat_shape"), in CreateMiniGraph() 73 auto flat = ops::Reshape(s.WithOpName("flat"), relu, flat_shape); in CreateMiniGraph() 76 ops::Variable(s.WithOpName("W2"), in CreateMiniGraph() [all …]
|
/external/tensorflow/tensorflow/examples/wav_to_spectrogram/ |
D | wav_to_spectrogram.cc | 56 tensorflow::ops::ReadFile(root.WithOpName("input_wav"), input_wav); in WavToSpectrogram() 58 DecodeWav(root.WithOpName("wav_decoder"), file_reader); in WavToSpectrogram() 59 Output spectrogram = AudioSpectrogram(root.WithOpName("spectrogram"), in WavToSpectrogram() 62 Placeholder(root.WithOpName("brightness_placeholder"), DT_FLOAT, in WavToSpectrogram() 64 Output mul = Mul(root.WithOpName("mul"), spectrogram, brightness_placeholder); in WavToSpectrogram() 65 Output min_const = Const(root.WithOpName("min_const"), 255.0f); in WavToSpectrogram() 66 Output min = Minimum(root.WithOpName("min"), mul, min_const); in WavToSpectrogram() 67 Output cast = Cast(root.WithOpName("cast"), min, DT_UINT8); in WavToSpectrogram() 68 Output expand_dims_const = Const(root.WithOpName("expand_dims_const"), -1); in WavToSpectrogram() 70 ExpandDims(root.WithOpName("expand_dims"), cast, expand_dims_const); in WavToSpectrogram() [all …]
|