matterport / Mask_RCNN

Mask R-CNN for object detection and instance segmentation on Keras and TensorFlow
Other
24.69k stars 11.7k forks source link

TypeError: Could not build a TypeSpec for <KerasTensor: shape=(None, None, 4) #2458

Open hisham-zadfresh opened 3 years ago

hisham-zadfresh commented 3 years ago

I got this error when I try to run this command:

python3 balloon.py train --dataset=/home/ubuntu/examples/research/mask-rcnn/samples/balloon/data  --weights=coco
Traceback (most recent call last):
  File "balloon.py", line 330, in <module>
    model = modellib.MaskRCNN(mode="training", config=config, model_dir=args.logs)
  File "/home/ubuntu/examples/research/mask-rcnn/mrcnn/model.py", line 1837, in __init__
    self.keras_model = self.build(mode=mode, config=config)
  File "/home/ubuntu/examples/research/mask-rcnn/mrcnn/model.py", line 1876, in build
    x, K.shape(input_image)[1:3]))(input_gt_boxes)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py", line 952, in __call__
    input_list)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py", line 1091, in _functional_construction_call
    inputs, input_masks, args, kwargs)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py", line 822, in _keras_tensor_symbolic_call
    return self._infer_output_signature(inputs, args, kwargs, input_masks)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py", line 869, in _infer_output_signature
    keras_tensor.keras_tensor_from_tensor, outputs)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/util/nest.py", line 659, in map_structure
    structure[0], [func(*x) for x in entries],
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/util/nest.py", line 659, in <listcomp>
    structure[0], [func(*x) for x in entries],
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/keras_tensor.py", line 606, in keras_tensor_from_tensor
    out = keras_tensor_cls.from_tensor(tensor)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/keras_tensor.py", line 205, in from_tensor
    type_spec = type_spec_module.type_spec_from_value(tensor)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/type_spec.py", line 554, in type_spec_from_value
    (value, type(value).__name__))
TypeError: Could not build a TypeSpec for <KerasTensor: shape=(None, None, 4) dtype=float32 (created by layer 'tf.math.truediv')> with type KerasTensor

This happens in mrcnn/model.py:1875

TeamDman commented 3 years ago

Same here. A pip freeze > out.txt from someone who has the examples working would be nice. The provided requirements.txt is installing some jank that doesn't work together apparently.

panovr commented 3 years ago

I got the same error when trained with tensorflow 2.4

RisingPhoelix commented 3 years ago

Have a look at #2427. Sounds like this will help

panovr commented 3 years ago

@RisingPhoelix I tried this solution, and it seems worked at first. And I will do more test with this repo and tensorflow 2.4.1. Thanks!

enoceanwei commented 3 years ago

@panovr

Hi there,

I am suffering the same problem with tensorflow 2.4.1, could you give me some idea how to fix it?

many thanks

devbas commented 3 years ago

Anyone that fixed this problem? Facing the same issue

nehakumar31 commented 3 years ago

For me, it got fixed by selection tensorflow version %tensorflow_version 1.x

dcbalderas commented 3 years ago

has anyone find any solution??

GK4444 commented 3 years ago

For me, it got fixed by selection tensorflow version %tensorflow_version 1.x

i tried the same but keras version is giving me problems. what is ur keras version? @nehakumar31

raditha commented 3 years ago

Have a look at #2427. Sounds like this will help

be sure to checkout the tesorflow2.0 branch

rakesh-kumar-k commented 3 years ago

I got this error when I try to run this command:

python3 balloon.py train --dataset=/home/ubuntu/examples/research/mask-rcnn/samples/balloon/data  --weights=coco
Traceback (most recent call last):
  File "balloon.py", line 330, in <module>
    model = modellib.MaskRCNN(mode="training", config=config, model_dir=args.logs)
  File "/home/ubuntu/examples/research/mask-rcnn/mrcnn/model.py", line 1837, in __init__
    self.keras_model = self.build(mode=mode, config=config)
  File "/home/ubuntu/examples/research/mask-rcnn/mrcnn/model.py", line 1876, in build
    x, K.shape(input_image)[1:3]))(input_gt_boxes)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py", line 952, in __call__
    input_list)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py", line 1091, in _functional_construction_call
    inputs, input_masks, args, kwargs)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py", line 822, in _keras_tensor_symbolic_call
    return self._infer_output_signature(inputs, args, kwargs, input_masks)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py", line 869, in _infer_output_signature
    keras_tensor.keras_tensor_from_tensor, outputs)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/util/nest.py", line 659, in map_structure
    structure[0], [func(*x) for x in entries],
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/util/nest.py", line 659, in <listcomp>
    structure[0], [func(*x) for x in entries],
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/keras_tensor.py", line 606, in keras_tensor_from_tensor
    out = keras_tensor_cls.from_tensor(tensor)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/keras_tensor.py", line 205, in from_tensor
    type_spec = type_spec_module.type_spec_from_value(tensor)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/type_spec.py", line 554, in type_spec_from_value
    (value, type(value).__name__))
TypeError: Could not build a TypeSpec for <KerasTensor: shape=(None, None, 4) dtype=float32 (created by layer 'tf.math.truediv')> with type KerasTensor

This happens in mrcnn/model.py:1875

found out solution?

youreternity1997 commented 3 years ago

I resolve the problem and can work with below environment: python : 3.7.10 GPU : RTX3090ti pip install tensorflow==2.3.0 pip install tensorflow-gpu==2.3.0 pip install keras==2.4.3 cudatoolkit==11.0.221

Can solve above problem. But another problem produces:

ValueError:
The following Variables were created within a Lambda layer (anchors)but are not tracked by said layer:<tf.Variable 'anchors/Variable:0' shape=(2, 261888, 4) dtype=float32>The layer cannot safely ensure proper Variable reuse across multiple
calls, and consquently this behavior is disallowed for safety. Lambda layers are not well suited to stateful computation; instead, writing a subclassed Layer is the recommend way to define layers withVariables.

The Solutions : There are 2 choices -

  1. Change to use Tensorflow 1.X.. This error will not be raised.
  2. Replace the Lambda layer with subclass of Keras Layer() (mrcnn/model.py:1946):

anchors = KL.Lambda(lambda x: tf.Variable(anchors), name="anchors")(input_image)

to

class AnchorsLayer(KL.Layer):
    def __init__(self, anchors, name="anchors", **kwargs):
        super(AnchorsLayer, self).__init__(name=name, **kwargs)
        self.anchors = tf.Variable(anchors)

    def call(self, dummy):
        return self.anchors

    def get_config(self):
        config = super(AnchorsLayer, self).get_config()
        return config

anchors = AnchorsLayer(anchors, name="anchors")(input_image)

Hope to help you!

silencessss commented 3 years ago

I have the same problem! My TensorFlow is also 2.4.1.

linaouro commented 3 years ago

I had the same problem, when I replaced all the tf.compat.v1.where by tf.where along with that removed the tf.compat.v1.disable_eager_execution()

Once I put tf.compat.v1.disable_eager_execution() back in the error disappears

yemre-data commented 3 years ago

Hi everyone, I am trying to concatenate basic MLP and EfficientNet to use both image features and meta data feature. But i got same error : Could not build a TypeSpec for <KerasTensor: shape=(None, 6) dtype=float32 (created by layer 'tf.concat_1')> with type KerasTensor

Can anyone help me please?

def build_model(): inputs = layers.Input(shape=(380, 380, 3)) x = img_augmentation(inputs) model = EfficientNetB4(include_top=False, input_tensor=x, weights="imagenet")

# Freeze the pretrained weights
model.trainable = False

# Rebuild top
x = layers.GlobalAveragePooling2D(name="avg_pool")(model.output)
top_dropout_rate = 0.2
x = layers.Dropout(top_dropout_rate, name="top_dropout2")(x)
outputs = layers.Dense(3, activation="softmax", name="pred3")(x)

model = tf.keras.Model(inputs, outputs, name="Transfer_Model")
for layer in model.layers[-20:]:
    if not isinstance(layer, layers.BatchNormalization):
        layer.trainable = True

return model

def create_mlp(dim,regularizer=None): """Creates a simple two-layer MLP with inputs of the given dimension""" model = Sequential() model.add(Dense(9, input_dim=dim, activation="relu",kernel_regularizer=regularizer )) model.add(Dense(3, activation="relu",name='second' )) return model mlp1 = create_mlp(3,regularizer=regularizers.l2(0.001)) eff = build_model()

Create the input to the final set of layers as the output of both the MLP and EficentNet combinedInput = concatenate([mlp1.output, eff.output])

Error is giving concatenate part. Thank you in advance !

xiaobeibi commented 3 years ago

I got this error when I try to run this command: Traceback (most recent call last): File "E:/PycharmProjects/Mask_RCNN-2.1/samples/balloon/balloon.py", line 330, in model_dir=args.logs) File "E:\PycharmProjects\Mask_RCNN-2.1\model.py", line 1768, in init self.keras_model = self.build(mode=mode, config=config) File "E:\PycharmProjects\Mask_RCNN-2.1\model.py", line 1807, in build gt_boxes = KL.Lambda(lambda x: x / image_scale)(input_gt_boxes) File "E:\PycharmProjects\Mask_RCNN-2.1\venv\lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 970, in call input_list) File "E:\PycharmProjects\Mask_RCNN-2.1\venv\lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 1108, in _functional_construction_call inputs, input_masks, args, kwargs) File "E:\PycharmProjects\Mask_RCNN-2.1\venv\lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 840, in _keras_tensor_symbolic_call return self._infer_output_signature(inputs, args, kwargs, input_masks) File "E:\PycharmProjects\Mask_RCNN-2.1\venv\lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 886, in _infer_output_signature keras_tensor.keras_tensor_from_tensor, outputs) File "E:\PycharmProjects\Mask_RCNN-2.1\venv\lib\site-packages\tensorflow\python\util\nest.py", line 867, in map_structure structure[0], [func(x) for x in entries], File "E:\PycharmProjects\Mask_RCNN-2.1\venv\lib\site-packages\tensorflow\python\util\nest.py", line 867, in structure[0], [func(x) for x in entries], File "E:\PycharmProjects\Mask_RCNN-2.1\venv\lib\site-packages\tensorflow\python\keras\engine\keras_tensor.py", line 590, in keras_tensor_from_tensor out = keras_tensor_cls.from_tensor(tensor) File "E:\PycharmProjects\Mask_RCNN-2.1\venv\lib\site-packages\tensorflow\python\keras\engine\keras_tensor.py", line 182, in from_tensor type_spec = type_spec_module.type_spec_from_value(tensor) File "E:\PycharmProjects\Mask_RCNN-2.1\venv\lib\site-packages\tensorflow\python\framework\type_spec.py", line 580, in type_spec_from_value (value, type(value).name)) TypeError: Could not build a TypeSpec for <KerasTensor: shape=(None, None, 4) dtype=float32 (created by layer 'tf.math.truediv')> with type KerasTensor

python3.6 Keras2.4.3 TensorFlow2.5.0

Tzu-Jan commented 3 years ago

Same problem here and I tried the solution provided by @linaouro, but it still doesn't work. Does anyone have an idea? Thank you in advance!

Google colab python 3.7 Tensorflow 2.4 Keras 2.4.3 cudatoolkit==11.0.2210

Traceback (most recent call last): File "train.py", line 335, in model_dir=args.logs) File "/content/drive/My Drive/mask_rcnn/Mask_RCNN-TF2/mrcnn/model.py", line 1837, in init self.keras_model = self.build(mode=mode, config=config) File "/content/drive/My Drive/mask_rcnn/Mask_RCNN-TF2/mrcnn/model.py", line 1876, in build x, K.shape(input_image)[1:3]))(input_gt_boxes) File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 952, in call input_list) File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 1091, in _functional_construction_call inputs, input_masks, args, kwargs) File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 822, in _keras_tensor_symbolic_call return self._infer_output_signature(inputs, args, kwargs, input_masks) File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 869, in _infer_output_signature keras_tensor.keras_tensor_from_tensor, outputs) File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/util/nest.py", line 659, in map_structure structure[0], [func(x) for x in entries], File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/util/nest.py", line 659, in structure[0], [func(x) for x in entries], File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/keras_tensor.py", line 606, in keras_tensor_from_tensor out = keras_tensor_cls.from_tensor(tensor) File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/keras_tensor.py", line 205, in from_tensor type_spec = type_spec_module.type_spec_from_value(tensor) File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/type_spec.py", line 554, in type_spec_from_value (value, type(value).name)) TypeError: Could not build a TypeSpec for <KerasTensor: shape=(None, None, 4) dtype=float32 (created by layer 'tf.math.truediv')> with type KerasTensor

panovr commented 3 years ago

@enoceanwei Hi, I think we should use tensorflow v1, not v2.

yemre-data commented 3 years ago

@panovr But it will give another error because rest of part it made with v2.5

linaouro commented 3 years ago

@Tzu-Jan I think you should upgrade your python to 3.8 My solution worked when I used tensorflow 2.4.0 with python3.8 (using the tf2 version of the net by https://github.com/leekunhee/Mask_RCNN/tree/tensorflow2.0)

bfhaha commented 3 years ago

@linaouro Hello Linaouro. Thanks for the leekunhee's version. But I have a problem. When I was running the following cell in train_shapes.ipynb.

model.train(dataset_train, dataset_val, 
            learning_rate=config.LEARNING_RATE, 
            epochs=1, 
            layers='heads')

The running button had stopped but the status bar was still executing. Should I wait it or there are some problems I have to solve. Screen Shot 2021-06-10 at 10 35 13 PM

bfhaha commented 3 years ago

@linaouro I figured out the problem. It had been executing 6 hours then interrupted because of running out of the GPU (Google Colab has a limit). I tried to run it again without GPU and it trained successfully. Thanks.

yemre-data commented 3 years ago

Hi everyone solved this problem on colab. python 3.7.10 !pip install 'h5py==2.10.0' --force-reinstall !pip uninstall keras-nightly !pip uninstall -y tensorflow !pip install tensorflow_gpu==2.4.0 !pip install keras==2.4.0 !pip install keras --user !pip uninstall keras-preprocessing !pip install git+https://github.com/keras-team/keras-preprocessing.git import tensorflow.compat.v1 as tf tf.disable_v2_behavior() tf.compat.v1.get_default_graph()

you should with this order on colab it worked for me !

ag-din commented 3 years ago

Hi, I had the same problem on Colab Notebook. Python 3.7.10 Keras: 2.5.0 Tensorflow: 2.5.0 My solution: In file model.py:

import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
Replace the Lambda layer with subclass of Keras Layer() (mrcnn/model.py:1946), see 

TypeError: Could not build a TypeSpec for <KerasTensor: shape=(None, None, 4) #2458 (comment) For the AttributeError about tf.log see AttributeError: module 'tensorflow' has no attribute 'log' #1797 (comment) and AttributeError: module 'tensorflow' has no attribute 'log' #1797 (comment)

mansi-aggarwal-2504 commented 3 years ago

Hi, I had the same problem on Colab Notebook. Python 3.7.10 Keras: 2.5.0 Tensorflow: 2.5.0 My solution: In file model.py:

import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
Replace the Lambda layer with subclass of Keras Layer() (mrcnn/model.py:1946), see 

TypeError: Could not build a TypeSpec for <KerasTensor: shape=(None, None, 4) #2458 (comment) For the AttributeError about tf.log see AttributeError: module 'tensorflow' has no attribute 'log' #1797 (comment) and AttributeError: module 'tensorflow' has no attribute 'log' #1797 (comment)

Hi @agustinadinamarca, I did this and I am not getting the TypeError anymore but as mentioned in your comment, I am getting this error: AttributeError: module 'tensorflow' has no attribute 'log' Which comment in the linked issue helped you? I tried this but I am still getting the log error.

getch-geohum commented 3 years ago

Hi, I had the same problem on Colab Notebook. Python 3.7.10 Keras: 2.5.0 Tensorflow: 2.5.0 My solution: In file model.py:

import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
Replace the Lambda layer with subclass of Keras Layer() (mrcnn/model.py:1946), see 

TypeError: Could not build a TypeSpec for <KerasTensor: shape=(None, None, 4) #2458 (comment) For the AttributeError about tf.log see AttributeError: module 'tensorflow' has no attribute 'log' #1797 (comment) and AttributeError: module 'tensorflow' has no attribute 'log' #1797 (comment)

Hi @agustinadinamarca, I did this and I am not getting the TypeError anymore but as mentioned in your comment, I am getting this error: AttributeError: module 'tensorflow' has no attribute 'log' Which comment in the linked issue helped you? I tried this but I am still getting the log error.

@mansi-aggarwal-2504 I have also the same error. Which version of the Mask RCNN source code do you use?

mansi-aggarwal-2504 commented 3 years ago

Hi @getgeosoft. I actually got caught up in errors due to version incompatibility issues. But I started afresh and created a new environment. Refer to this issue I raised. I hope this helps. P.S. I use Google Colab.

rcx986635 commented 3 years ago

In addition to the two options which youreternity1997 provided, here is a third option. we can change : gt_boxes = KL.Lambda(lambda x: norm_boxes_graph(x, K.shape(input_image)[1:3]))(input_gt_boxes) #this for tf1 gt_boxes = KL.Lambda(lambda x: norm_boxes_graph2(x))([input_gt_boxes,input_image]) #this for tf2 where, def norm_boxes_graph2(x): boxes,tensor_for_shape = x shape = tf.shape(tensor_for_shape)[1:3] return norm_boxes_graph(boxes,shape)

adsk2050 commented 3 years ago

@Tzu-Jan I think you should upgrade your python to 3.8 My solution worked when I used tensorflow 2.4.0 with python3.8 (using the tf2 version of the net by https://github.com/leekunhee/Mask_RCNN/tree/tensorflow2.0)

Is it possible that these changes are merged by the moderators of this repository? @waleedka

Also, why is this repository not actively maintained? despite people finding the use for it? I would be glad if I could help. Please guide me.

BangarrajuMuppidi commented 2 years ago

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 'tensorflow.python.keras.engine.keras_tensor.KerasTensor'>.

i got this error when i try to run maskrcnn code

any one fix this error

Msmhasani commented 2 years ago

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 'tensorflow.python.keras.engine.keras_tensor.KerasTensor'>.

i got this error when i try to run maskrcnn code

any one fix this error

Try @rcx986635 answer You should make this change in the Mask_RCNN/mrcnn/model.py line 1875 (or somewhere around!)

voccer commented 2 years ago

For me, it got fixed by selection tensorflow version %tensorflow_version 1.x

Thanks Ahmad! It worked for me by running a completely independent virtual environment with a fresh install and specific tensor flow=1.13.1 and keras=2.1.0 versions

haroldsnyers commented 2 years ago

Hey, I was able to fix that issue simply by installing tf-estimator-nightly in colab. Found that it was missing by trying what @yemre-data proposed. The following solution is simpler and also doesn't require to restart the runtime

!pip install tf-estimator-nightly==2.8.0.dev2021122109

farhan2786 commented 1 year ago

This is what worked for me.

  1. Get the model.py from https://github.com/leekunhee/Mask_RCNN/tree/tensorflow2.0
  2. Go to your environment-lib-site-packages and look for .egg file( for me it was mask_rcnn_tf2-1.0py3.7.egg). It could be different for you based on your environment. Create a backup of this file.
  3. Copy that file (mask_rcnn_tf2-1.0py3.7.egg) and paste it some another folder, eg. Downloads:
  4. Change the extension into a .zip file
  5. Extract the folder. You will get two folders EGG-INFO and mrcnn
  6. Open mrcnn and paste the model.py file from https://github.com/leekunhee/Mask_RCNN/tree/tensorflow2.0 in there. Press Replace the file in the destination folder.
  7. Go back and compress the two folders (EGG-INFO and mrcnn) into a zip file and rename it according to your .egg file. Change the extension back to .egg.
  8. Copy and replace the file back to the site-packages folder. This avoids the arduous tasks of fixing all errors one by one. My versions are as follows:

TensorFlow: 2.5.0 Keras: 2.6.0 Python: 3.7.0 Cuda: 11.2 Hope this helps!!!

Rizwanali324 commented 1 year ago

Anyone that fixed this problem? Facing the same issue

yes, it take me 2 weeka now

ijnyici42 commented 1 year ago

I fixed the issue by Downgrading python and tensorflow. my env: cuda 11.2 tensorflow 2.5.0 keras 2.6.0 python 3.7.0

But i got another error info as following:

... order = _validate_interpolation_order(image.dtype, order) D:\env\python3.7.0\lib\site-packages\skimage\transform_warps.py:830: FutureWarning: Input image dtype is bool. Interpolation is not defined with bool data type. Please set order to 0 or explicitely cast input image to another data type. Starting from version 0.19 a ValueError will be raised instead of this warning. order = _validate_interpolation_order(image.dtype, order) 99/100 [============================>.] - ETA: 1s - batch: 49.0000 - size: 2.0000 - loss: 0.1762 - rpn_class_loss: 0.0042 - rpn_bbox_loss: 0.0259 - mrcnn_class_loss: 0.0279 - mrcnn_bbox_loss: 0.0312 - mrcnn_mask_loss: 0.0869D:\env\python3.7.0\lib\site-packages\skimage\transform_warps.py:830: FutureWarning: Input image dtype is bool. Interpolation is not defined with bool data type. Please set order to 0 or explicitely cast input image to another data type. Starting from version 0.19 a ValueError will be raised instead of this warning. order = _validate_interpolation_order(image.dtype, order) D:\env\python3.7.0\lib\site-packages\skimage\transform_warps.py:830: FutureWarning: Input image dtype is bool. Interpolation is not defined with bool data type. Please set order to 0 or explicitely cast input image to another data type. Starting from version 0.19 a ValueError will be raised instead of this warning. order = _validate_interpolation_order(image.dtype, order) 2023-09-27 00:13:25.528767: E tensorflow/stream_executor/stream.cc:334] Error recording event in stream: Error recording CUDA event: CUDA_ERROR_UNKNOWN: unknown error; not marking stream as bad, as the Event object may be at fault. Monitor for further errors. 2023-09-27 00:13:25.528894: E tensorflow/stream_executor/cuda/cuda_event.cc:29] Error polling for event status: failed to query event: CUDA_ERROR_UNKNOWN: unknown error 2023-09-27 00:13:25.528950: F tensorflow/core/common_runtime/device/device_event_mgr.cc:221] Unexpected Event status: 1

mikl20022002 commented 1 year ago
from tensorflow.python.framework.ops import disable_eager_execution
disable_eager_execution()

it helps me

Rizwanali324 commented 1 year ago

are u using google colab?

On Tue, Oct 10, 2023 at 11:53 AM mikl20022002 @.***> wrote:

from tensorflow.python.framework.ops import disable_eager_execution disable_eager_execution()

it helps me

— Reply to this email directly, view it on GitHub https://github.com/matterport/Mask_RCNN/issues/2458#issuecomment-1756049064, or unsubscribe https://github.com/notifications/unsubscribe-auth/A667UZE5EC4T24FWBV3UL3LX6WKSVAVCNFSM4VVM3DA2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZVGYYDIOJQGY2A . You are receiving this because you commented.Message ID: @.***>

mikl20022002 commented 1 year ago

are u using google colab?

yes