Mask-R CNN COLAB TENSORFLOW VERSION

Hi,

I’m trying to run the mask-r cnn model on colab. maskr cnn does not work with new versions from tensorflow. Model Works for tensorflow 2.4.0. but I can’t install colab.
How should I change versions to run colab? Please, help me:)

!pip install tensorflow==2.4.0

ERROR: Could not find a version that satisfies the requirement tensorflow==2.4.0 (from versions: 2.8.0rc0, 2.8.0rc1, 2.8.0, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.9.0rc0, 2.9.0rc1, 2.9.0rc2, 2.9.0, 2.9.1, 2.9.2, 2.9.3, 2.10.0rc0, 2.10.0rc1, 2.10.0rc2, 2.10.0rc3, 2.10.0, 2.10.1, 2.11.0rc0, 2.11.0rc1, 2.11.0rc2, 2.11.0, 2.11.1, 2.12.0rc0, 2.12.0rc1, 2.12.0, 2.12.1, 2.13.0rc0, 2.13.0rc1, 2.13.0rc2, 2.13.0, 2.13.1, 2.14.0rc0, 2.14.0rc1, 2.14.0, 2.14.1, 2.15.0rc0, 2.15.0rc1, 2.15.0, 2.15.0.post1, 2.15.1, 2.16.0rc0, 2.16.1)
ERROR: No matching distribution found for tensorflow==2.4.0

Hi @Laura1 can you please clarify what colab you’re talking about?
thank you.

Hi @tagoma , google colab.

I want install python 3.8.0,
tensorflow 2.4.0 but it didnt.
I dont downgrade versions in google colab. If you want, I can share my colab notebook.

Indeed, this would help if you were sharing your colab!

Hello again @tagoma Google Colab my colab notebook is here. I would be very happy if you could guide me.

I cant solve last cell code error.
TypeError: Could not build a TypeSpec for KerasTensor(type_spec=TensorSpec(shape=(None, None, 4), dtype=tf.float32, name=None), name=‘tf.math.truediv_2/truediv:0’, description=“created by layer ‘tf.math.truediv_2’”) of unsupported type <class ‘keras.src.engine.keras_tensor.KerasTensor’>.

Hi @Laura1
And below is the actual error you are facing right?

model = modellib.MaskRCNN(mode="training", config=config,
                                  model_dir=DEFAULT_LOGS_DIR)

TypeError: Could not build a TypeSpec for KerasTensor(type_spec=TensorSpec(shape=(None, None, 4), dtype=tf.float32, name=None), name='tf.math.truediv/truediv:0', description="created by layer 'tf.math.truediv'") of unsupported type <class 'keras.src.engine.keras_tensor.KerasTensor'>.

yes, my error TypeError: Could not build a TypeSpec for KerasTensor(type_spec=TensorSpec(shape=(None, None, 4), dtype=tf.float32, name=None), name=‘tf.math.truediv/truediv:0’, description=“created by layer ‘tf.math.truediv’”) of unsupported type <class ‘keras.src.engine.keras_tensor.KerasTensor’>.