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

Function XTimesTwo

tensorflow/core/framework/function_testlib.cc:119–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119FunctionDef XTimesTwo() {
120 const Tensor kTwo = test::AsScalar<int64>(2);
121 return FDH::Define(
122 // Name
123 "XTimesTwo",
124 // Args
125 {"x: T"},
126 // Return values
127 {"y: T"},
128 // Attr def
129 {"T: {float, double, int32, int64}"},
130 // Nodes
131 {
132 {{"two"}, "Const", {}, {{"value", kTwo}, {"dtype", DT_INT64}}},
133 {{"scale"}, "Cast", {"two"}, {{"SrcT", DT_INT64}, {"DstT", "$T"}}},
134 {{"y"}, "Mul", {"x", "scale"}, {{"T", "$T"}}},
135 });
136}
137
138FunctionDef TwoDeviceMult() {
139 const Tensor kTwo = test::AsScalar<int64>(2);

Callers 15

TEST_FFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
TEST_FFunction · 0.85
TESTFunction · 0.85
TEST_FFunction · 0.85
TEST_FFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected