simple_tensorflow_serving icon indicating copy to clipboard operation
simple_tensorflow_serving copied to clipboard

TypeError: int() argument must be a string, a bytes-like object or a number, not 'DType'

Open Single430 opened this issue 4 years ago • 2 comments

Error

File "./gen_client/gen_client.py", line 76, in gen_tensorflow_client
    if dtype == int(tf.int8) or dtype == int(tf.uint8) or dtype == int(

TypeError: int() argument must be a string, a bytes-like object or a number, not 'DType'

change

dtype = input_opname_dtype_map[opname]
if dtype in [6, 4, 5, 17, 3, 22]:
    default_value = 1
elif dtype in [9, 23]:
    default_value = 1
elif dtype in [3]:
    default_value = True
elif dtype in [7]:
    default_value = ""
# if dtype == int(tf.int8) or dtype == int(tf.uint8) or dtype == int(
#     tf.int16) or dtype == int(tf.uint16) or dtype == int(
#         tf.int32) or dtype == int(tf.uint32):
#   default_value = 1
# elif dtype == int(tf.int64) or dtype == int(tf.uint64):
#   default_value = 1
# elif dtype == int(tf.int32):
#   default_value = True
# elif dtype == int(tf.string):
#   default_value = ""

result

  • is run

Single430 avatar Aug 01 '19 07:08 Single430

i met the same problem. and didn't generate client.py file

GaoQ1 avatar Sep 25 '19 06:09 GaoQ1

@GaoQ1 file path is: simple_tensorflow_serving/gen_client/gen_client.py

Single430 avatar Sep 29 '19 02:09 Single430