Mask_RCNN
Mask_RCNN copied to clipboard
MRCNN-TF2.5 upgrade: Exception has occurred: TypeError unhashable type: 'ListWrapper' when adding loss to keras model
I am updating MRCNN to work on TF2.5 and am running into this issue:
Exception has occurred: TypeError unhashable type: 'ListWrapper'
coming from: ----------------------------------------------------------
loss_orig = tf.reduce_mean(layer.output, keepdims=True) * self.config.LOSS_WEIGHTS.get(name, 1.) #original loss = tf.reduce_mean(input_tensor=layer.output, keepdims=True) * self.config.LOSS_WEIGHTS.get(name, 1.) #new
print("ref",self.config.LOSS_WEIGHTS.get(name, 1.)) print("ref",loss_orig) print("ref",loss)
self.keras_model.add_loss(loss)
This error happens at the start of training a new model, based on coco weights. I've trained this model before, on the same custom dataset using TF2.0.0, but need to upgrade TF versions such that the training can be pushed to the cloud compute service I am using (they don't let you use TF2.0.0).
I am using py3.7.9, and have taken keras out of the model completely. Up-to-date branch where i am experiencing this issue: https://github.com/lrpalmer27/Mask-RCNN-TF2/tree/python379_implementation
I am unsure why this issue is occurring; has anyone seen this issue before? Thanks in advance for any info/ideas/advice.
Hello, @lrpalmer27 I have same error. Did you solve ?
Hi I was able to run it in colab.