`---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/eager/execute.py in make_shape(v, arg_name)
210 try:
→ 211 shape = tensor_shape.as_shape(v)
212 except TypeError as e:
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/framework/tensor_shape.py in as_shape(shape)
1210 else:
→ 1211 return TensorShape(shape)
1212
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/framework/tensor_shape.py in init(self, dims)
770 else:
→ 771 self._dims = [as_dimension(d) for d in dims_iter]
772
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/framework/tensor_shape.py in (.0)
770 else:
→ 771 self._dims = [as_dimension(d) for d in dims_iter]
772
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/framework/tensor_shape.py in as_dimension(value)
715 else:
→ 716 return Dimension(value)
717
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/framework/tensor_shape.py in init(self, value)
199 “an index method, got {!r}”.format(value)),
→ 200 None)
201 if self._value < 0:
/usr/local/lib/python3.6/dist-packages/six.py in raise_from(value, from_value)
TypeError: Dimension value must be integer or None or have an index method, got ‘class_name’
During handling of the above exception, another exception occurred:
TypeError Traceback (most recent call last)
in
----> 1 model = keras.models.load_model(“/home/jetbot/Notebooks/digit_detection/modelTrained_textDetection_100”)
2 # Show its architecture
3 model.summary()
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/keras/saving/save.py in load_model(filepath, custom_objects, compile)
148 if isinstance(filepath, six.string_types):
149 loader_impl.parse_saved_model(filepath)
→ 150 return saved_model_load.load(filepath, compile)
151
152 raise IOError(
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/keras/saving/saved_model/load.py in load(path, compile)
87 # TODO(kathywu): Add saving/loading of optimizer, compiled losses and metrics.
88 # TODO(kathywu): Add code to load from objects that contain all endpoints
—> 89 model = tf_load.load_internal(path, loader_cls=KerasObjectLoader)
90
91 # pylint: disable=protected-access
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/saved_model/load.py in load_internal(export_dir, tags, loader_cls)
550 loader = loader_cls(object_graph_proto,
551 saved_model_proto,
→ 552 export_dir)
553 root = loader.get(0)
554 root.tensorflow_version = meta_graph_def.meta_info_def.tensorflow_version
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/keras/saving/saved_model/load.py in init(self, *args, **kwargs)
117 def init(self, *args, **kwargs):
118 super(KerasObjectLoader, self).init(*args, **kwargs)
→ 119 self._finalize()
120
121 def _finalize(self):
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/keras/saving/saved_model/load.py in _finalize(self)
149 node._layers =
150 for layer in node.keras_api.layers:
→ 151 node.add(layer)
152 elif is_graph_network:
153 # Reconstruct functional model from the config and layers loaded
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/training/tracking/base.py in _method_wrapper(self, *args, **kwargs)
455 self._self_setattr_tracking = False # pylint: disable=protected-access
456 try:
→ 457 result = method(self, *args, **kwargs)
458 finally:
459 self._self_setattr_tracking = previous_value # pylint: disable=protected-access
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/keras/engine/sequential.py in add(self, layer)
179 # Instantiate an input layer.
180 x = input_layer.Input(
→ 181 batch_shape=batch_shape, dtype=dtype, name=layer.name + ‘_input’)
182 # This will build the current layer
183 # and create the node connecting the current layer
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/keras/engine/input_layer.py in Input(shape, batch_size, name, dtype, sparse, tensor, ragged, **kwargs)
268 ‘dimension.’)
269
→ 270 input_layer = InputLayer(**input_layer_config)
271
272 # Return tensor including _keras_history
.
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/keras/engine/input_layer.py in init(self, input_shape, batch_size, dtype, input_tensor, sparse, name, ragged, **kwargs)
125 name=self.name,
126 sparse=sparse,
→ 127 ragged=ragged)
128
129 self.is_placeholder = True
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/keras/backend.py in placeholder(shape, ndim, dtype, sparse, name, ragged)
1052 expand_composites=True)
1053 else:
→ 1054 x = array_ops.placeholder(dtype, shape=shape, name=name)
1055 return x
1056
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/ops/array_ops.py in placeholder(dtype, shape, name)
2716 “eager execution.”)
2717
→ 2718 return gen_array_ops.placeholder(dtype=dtype, shape=shape, name=name)
2719
2720
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/ops/gen_array_ops.py in placeholder(dtype, shape, name)
6028 if shape is None:
6029 shape = None
→ 6030 shape = _execute.make_shape(shape, “shape”)
6031 _, _, _op, _outputs = _op_def_library._apply_op_helper(
6032 “Placeholder”, dtype=dtype, shape=shape, name=name)
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/eager/execute.py in make_shape(v, arg_name)
211 shape = tensor_shape.as_shape(v)
212 except TypeError as e:
→ 213 raise TypeError(“Error converting %s to a TensorShape: %s.” % (arg_name, e))
214 except ValueError as e:
215 raise ValueError(“Error converting %s to a TensorShape: %s.” % (arg_name,
TypeError: Error converting shape to a TensorShape: Dimension value must be integer or None or have an index method, got ‘class_name’.`
I installed TensorFlow 2.1 for Jetpack 4.3 but I think I needed TensorFlow 2.2 for my keras to work. What can I do?