"src/targets/gpu/vscode:/vscode.git/clone" did not exist on "2d4e8581306557111d2b1efaa537776071b14f34"
Unverified Commit f8b56a66 authored by kahmed10's avatar kahmed10 Committed by GitHub
Browse files

Extra tf ops (#679)

* initial testing

* add new ops

* remove comment

* remove extra changes

* remove extra changes

* add tests

* formatting

* add tests
parent 2466dd6f
...@@ -180,12 +180,12 @@ struct tf_parser ...@@ -180,12 +180,12 @@ struct tf_parser
add_generic_op("Identity", op::identity{}); add_generic_op("Identity", op::identity{});
add_generic_op("LessEqual", op::identity{}); add_generic_op("LessEqual", op::identity{});
add_generic_op("Relu", op::relu{}); add_generic_op("Relu", op::relu{});
// add_generic_op("Relu6", op::clip{6.0, 0.0});
add_generic_op("Rsqrt", op::rsqrt{}); add_generic_op("Rsqrt", op::rsqrt{});
add_generic_op("Tanh", op::tanh{}); add_generic_op("Tanh", op::tanh{});
add_generic_op("StopGradient", op::identity{}); add_generic_op("StopGradient", op::identity{});
add_binary_op("Add", op::add{}); add_binary_op("Add", op::add{});
add_binary_op("AddV2", op::add{});
add_binary_op("Mul", op::mul{}); add_binary_op("Mul", op::mul{});
add_binary_op("Pow", op::pow{}); add_binary_op("Pow", op::pow{});
add_binary_op("SquaredDifference", op::sqdiff{}); add_binary_op("SquaredDifference", op::sqdiff{});
...@@ -204,6 +204,7 @@ struct tf_parser ...@@ -204,6 +204,7 @@ struct tf_parser
add_mem_op("DepthwiseConv2dNative", &tf_parser::parse_depthwiseconv); add_mem_op("DepthwiseConv2dNative", &tf_parser::parse_depthwiseconv);
add_mem_op("ExpandDims", &tf_parser::parse_expanddims, false); add_mem_op("ExpandDims", &tf_parser::parse_expanddims, false);
add_mem_op("FusedBatchNorm", &tf_parser::parse_batchnorm); add_mem_op("FusedBatchNorm", &tf_parser::parse_batchnorm);
add_mem_op("FusedBatchNormV3", &tf_parser::parse_batchnorm);
add_mem_op("GatherV2", &tf_parser::parse_gather, false); add_mem_op("GatherV2", &tf_parser::parse_gather, false);
add_mem_op("MatMul", &tf_parser::parse_matmul, false); add_mem_op("MatMul", &tf_parser::parse_matmul, false);
add_mem_op("MaxPool", &tf_parser::parse_pooling); add_mem_op("MaxPool", &tf_parser::parse_pooling);
...@@ -1061,6 +1062,9 @@ struct tf_parser ...@@ -1061,6 +1062,9 @@ struct tf_parser
// assert ops ignored // assert ops ignored
if(node.op() == "Assert" or contains(name, "Assert")) if(node.op() == "Assert" or contains(name, "Assert"))
return; return;
// noOps ignored
if(node.op() == "NoOp" or contains(name, "NoOp"))
return;
std::vector<instruction_ref> args; std::vector<instruction_ref> args;
for(auto&& input : node.input()) for(auto&& input : node.input())
......
2 2
0 Placeholder* 0 Placeholder*
dtype0*
shape shape
:* :
dtype0
2 2
1 Placeholder* 1 Placeholder*
dtype0* dtype0*
...@@ -12,4 +12,4 @@ ...@@ -12,4 +12,4 @@
add_bcast1Add01* add_bcast1Add01*
T0" T0"
\ No newline at end of file \ No newline at end of file
: :
0 Placeholder* 0 Placeholder*
shape:* dtype0*
dtype0 shape:
: :
1 Placeholder* 1 Placeholder*
dtype0* dtype0*
shape: shape:
 
add1Add01* add1Add01*
T0" T0"
\ No newline at end of file \ No newline at end of file
:
0 Placeholder*
dtype0*
shape:
:
1 Placeholder*
dtype0*
shape:

add1AddV201*
T0"
\ No newline at end of file
No preview for this file type
No preview for this file type
: :
0 Placeholder* 0 Placeholder*
shape:* dtype0*
dtype0 shape:
: :
1 Placeholder* 1 Placeholder*
dtype0* dtype0*
shape: shape:
D F
batchmatmul1 BatchMatMul01* batchmatmul1 BatchMatMulV201*
T0*
adj_x(* adj_x(*
adj_y(* adj_y("
T0" \ No newline at end of file
\ No newline at end of file
; ;
0 Placeholder* 0 Placeholder*
shape:* dtype0*
dtype0 shape:
/ /
1 Placeholder* 1 Placeholder*
dtype0* dtype0*
...@@ -10,4 +10,4 @@ ...@@ -10,4 +10,4 @@
: :
bias_add1BiasAdd01* bias_add1BiasAdd01*
T0* T0*
data_formatNHWC" data_formatNHWC"
\ No newline at end of file \ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
This diff is collapsed.
: :
0 Placeholder* 0 Placeholder*
shape:* dtype0*
dtype0 shape:
identityIdentity0* identityIdentity0*
T0" T0"
\ No newline at end of file \ No newline at end of file
...@@ -13,4 +13,4 @@ F ...@@ -13,4 +13,4 @@ F
matmul1MatMul01* matmul1MatMul01*
T0* T0*
transpose_a(* transpose_a(*
transpose_b(" transpose_b("
\ No newline at end of file \ No newline at end of file
No preview for this file type
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment