Skip to content

Commit 5f9b7c8

Browse files
committed
fix typo
Signed-off-by: Deyu Huang <[email protected]>
1 parent ce749ce commit 5f9b7c8

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

examples/tf_custom_op/custom_op.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ import onnx
113113
import os
114114
from tf2onnx import utils
115115
from tf2onnx.handler import tf_op
116-
from tf2onnx.tf_loader import tf_placeholder
117116
118117
119118
DIR_PATH = os.path.realpath(os.path.dirname(__file__))
@@ -130,7 +129,7 @@ class DoubleAndAddOne:
130129
node_dtype = ctx.get_dtype(node.input[0])
131130
node_np_dtype = utils.map_onnx_to_numpy_type(node_dtype)
132131
133-
const_two = ctx.make_const(utils.make_name("cosnt_two"), np.array([2]).astype(node_np_dtype)).output[0]
132+
const_two = ctx.make_const(utils.make_name("const_two"), np.array([2]).astype(node_np_dtype)).output[0]
134133
node.input.append(const_two)
135134
136135
const_one = ctx.make_const(utils.make_name("const_one"), np.ones(node_shape, dtype=node_np_dtype)).output[0]

examples/tf_custom_op/double_and_add_one_custom_op.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
import numpy as np
55
import tensorflow as tf
6-
import tf2onnx
76
import onnx
87
import os
98
from tf2onnx import utils
@@ -25,7 +24,7 @@ def version_1(cls, ctx, node, **kwargs):
2524
node_dtype = ctx.get_dtype(node.input[0])
2625
node_np_dtype = utils.map_onnx_to_numpy_type(node_dtype)
2726

28-
const_two = ctx.make_const(utils.make_name("cosnt_two"), np.array([2]).astype(node_np_dtype)).output[0]
27+
const_two = ctx.make_const(utils.make_name("const_two"), np.array([2]).astype(node_np_dtype)).output[0]
2928
node.input.append(const_two)
3029

3130
const_one = ctx.make_const(utils.make_name("const_one"), np.ones(node_shape, dtype=node_np_dtype)).output[0]

examples/tf_custom_op/model.onnx

-363 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)