Open Mstfakts opened 2 years ago
I work with: RTX 3060 python 3.8 cuda_11.0.2_451.48_win10 cudnn-11.0-windows-x64-v8.0.4.30 TF: 2.3.0 Keras: 2.4.3 and it runs with GPU well. btw, I use https://github.com/leekunhee/Mask_RCNN for tf2.X
this might help in your case.
I work with: RTX 3060 python 3.8 cuda_11.0.2_451.48_win10 cudnn-11.0-windows-x64-v8.0.4.30 TF: 2.3.0 Keras: 2.4.3 and it runs with GPU well. btw, I use https://github.com/leekunhee/Mask_RCNN for tf2.X
He said he would like to use it without having to disable eager execution. The repo you linked to has eager execution disabled to make this code work with TF 2
Hello,
I've seen a number of projects made for TF2.x compatibility. Despite the fact that I have made necessary changes to the project, none of them work properly.
I've been working on a project that has a number of deep learning components that must work together. Also, as I strive to add new features to my project that include detection and segmentation, I've opted to use this framework. I was thinking that if I only changed a little portion of the MaskRCNN, it would still function with the rest of the project. My work, however, has been entangled due to version differences.
So, I was wondering how I could run MaskRCNN without utilizing
tf.compat.v1.disable eager execution()
in TF 2.4.1. If I utilize this line block, it impacts the entire working process of my project and causes numerous issues.TypeError: Could not build a TypeSpec for <tf.Operation 'tf.debugging.Assert/Assert/AssertGuard/Identity' type=Identity> with type Operation
Despite I made it a remark line, the project generates similar issues for the rest of the lines.
TypeError: To be compatible with tf.eager.defun, Python functions must return zero or more Tensors; in compilation of <function <lambda> at 0x0000015B27E0EEE8>, found return value of type <class 'tensorflow.python.keras.engine.keras_tensor.KerasTensor'>, which is not a Tensor.
Other issues I encountered when working with
tf.compat.v1.disable eager execution()
are listed below.3.1- I attempted to utilize that block of code to work for only one file, however once you place it in your project, it impacts the entire project. The rest of the project then produces a variety of mistakes.
3.2- After that, I put
tf.compat.v1.enable eager execution()
exactly before the'return' part of the file. In that scenario, the project states that it is not permitted to enable or disable easger execution while the project is in progress.