Skip to content

Instantly share code, notes, and snippets.

@grin
Created March 4, 2020 09:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grin/d1a9836aca5ca462dbb03527246ba941 to your computer and use it in GitHub Desktop.
Save grin/d1a9836aca5ca462dbb03527246ba941 to your computer and use it in GitHub Desktop.
SimplePose fit_generator train error full output
Tensror Flow version: 2.1.0
Downloading /root/.tensorflow/models/mobilenetv3_large_w1-0769-f66596ae.tf2.h5.zip from https://github.com/osmr/imgclsmob/releases/download/v0.0.422/mobilenetv3_large_w1-0769-f66596ae.tf2.h5.zip...
Model: "simple_pose_mobile"
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
backbone (Sequential) multiple 2996352
_________________________________________________________________
decoder (Sequential) multiple 1798080
_________________________________________________________________
heatmap_max_det (HeatmapMaxD multiple 0
=================================================================
Total params: 4,794,432
Trainable params: 4,768,240
Non-trainable params: 26,192
_________________________________________________________________
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-15-8596d89c7a7a> in <module>()
21 generator=train_data,
22 validation_data=valid_data,
---> 23 epochs=15
24 )
25
13 frames
/tensorflow-2.1.0/python3.6/tensorflow_core/python/autograph/impl/api.py in wrapper(*args, **kwargs)
235 except Exception as e: # pylint:disable=broad-except
236 if hasattr(e, 'ag_error_metadata'):
--> 237 raise e.ag_error_metadata.to_exception(e)
238 else:
239 raise
TypeError: in converted code:
/usr/local/lib/python3.6/dist-packages/tf2cv/models/simpleposemobile_coco.py:94 call *
heatmap = self.decoder(x, training=training)
/tensorflow-2.1.0/python3.6/tensorflow_core/python/keras/engine/base_layer.py:773 __call__
outputs = call_fn(cast_inputs, *args, **kwargs)
/usr/local/lib/python3.6/dist-packages/tf2cv/models/common.py:2016 call *
x = self.pix_shuffle(x)
/tensorflow-2.1.0/python3.6/tensorflow_core/python/keras/engine/base_layer.py:773 __call__
outputs = call_fn(cast_inputs, *args, **kwargs)
/usr/local/lib/python3.6/dist-packages/tf2cv/models/common.py:1971 call *
x = tf.reshape(x, shape=(batch, height, width, new_channels, f1 * f2))
/tensorflow-2.1.0/python3.6/tensorflow_core/python/ops/array_ops.py:193 reshape
result = gen_array_ops.reshape(tensor, shape, name)
/tensorflow-2.1.0/python3.6/tensorflow_core/python/ops/gen_array_ops.py:7443 reshape
"Reshape", tensor=tensor, shape=shape, name=name)
/tensorflow-2.1.0/python3.6/tensorflow_core/python/framework/op_def_library.py:471 _apply_op_helper
raise err
/tensorflow-2.1.0/python3.6/tensorflow_core/python/framework/op_def_library.py:468 _apply_op_helper
preferred_dtype=default_dtype)
/tensorflow-2.1.0/python3.6/tensorflow_core/python/framework/ops.py:1314 convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
/tensorflow-2.1.0/python3.6/tensorflow_core/python/framework/constant_op.py:317 _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
/tensorflow-2.1.0/python3.6/tensorflow_core/python/framework/constant_op.py:258 constant
allow_broadcast=True)
/tensorflow-2.1.0/python3.6/tensorflow_core/python/framework/constant_op.py:296 _constant_impl
allow_broadcast=allow_broadcast))
/tensorflow-2.1.0/python3.6/tensorflow_core/python/framework/tensor_util.py:547 make_tensor_proto
"supported type." % (type(values), values))
TypeError: Failed to convert object of type <class 'tuple'> to Tensor. Contents: (None, 4, 4, 128, 4). Consider casting elements to a supported type.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment