-
Notifications
You must be signed in to change notification settings - Fork 11.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TF 2.X & Keras 2.3.1 compatibility #2278
base: master
Are you sure you want to change the base?
Conversation
@IgnacioAmat |
@VictorAtPL With the changes I proposed I was able to run the training without any incompatibilities, the model was well trained and showed good results |
@IgnacioAmat |
@VictorAtPL |
@IgnacioAmat |
@VictorAtPL |
I am having some issues with this PR. |
You were right @ivanlen, I forgot to add those changes too for the compatibility of TF 2.X. Thanks for the remark ! |
Thank you very much. I was finally able to execute the code. Could you also let me know, were you able to start the training? As of now I have 350 training images and 50 validation images of size 256x256 with 4GB NVIDIA GTX 960. But it could not train and throws ran out of memory exception. |
Hi @RishikMani, you have to reduce your batch size to prevent running out of memory or reduce image size to lower resolution. |
Hey @RishikMani Ideally you can use a generator, check out: https://www.tensorflow.org/api_docs/python/tf/keras/utils/Sequence |
Hi, I get an error when trying to start training with this pr:
How can I fix this? |
@dsalnikov there is a solution in the issue section |
Hi bro, i am using the mask r cnn and lowered the loss to 0.1 sometimes 0.09, but the bal_loss is not converging? any suggestions on that? |
Is this working with CUDA 10.2? |
Yes @Shakesbeer333 |
Hi @kimile599, your problem may be that during training you are overfitting your data. Have you tried to increase you dataset size or using data augmentation ? Check these issues if to see if they can help you with your problem #281 and #527 |
Thank you for your reply. I am now doing the augmentation and try to flat the loss. |
What about updating requirements.txt? |
@jvdavim Are you thinking about upgrading the minimal versions of both TF and keras to be something like: |
Yes. But I just realized that there is no difference. It will install the latest version anyway. |
I got this error. tensorflow==2.3.1 |
Please check the comment of @NMazzatenta in this issue |
|
Got this error: |
@sirbastiano you seem to be having the same problem as @dsalnikov. You should maybe check this issue to see if it helps, but as @Shakesbeer333 said, the solution to this is on the issue section |
Do you have a colab version of your work? I'm struggling for my master
thesis. ( This Is not my field of study)
Il lun 5 ott 2020, 14:42 Ignacio Amat <notifications@github.com> ha scritto:
… @sirbastiano <https://github.com/SirBastiano> you seem to be having the
same problem as @dsalnikov <https://github.com/dsalnikov>. You should
maybe check this issue
<#1930> to see if it helps,
but as @Shakesbeer333 <https://github.com/Shakesbeer333> said, the
solution to this is on the issue section
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2278 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARFBHLUNHLAOD7ICWNMUKJ3SJG5KXANCNFSM4OVWJATA>
.
|
No, sorry @sirbastiano. Maybe @dsalnikov can give you a hint on how he managed to solve that problem. |
I figured out how to make it work. But now I receive this error:
TypeError Traceback (most recent call last)
<ipython-input-19-a9b60817b002> <https://localhost:8080/#> in
<module>() 2 image_id = random.choice(dataset_val.image_ids)
3 original_image, image_meta, gt_class_id, gt_bbox, gt_mask =
modellib.load_image_gt(dataset_val, inference_config, ----> 4
image_id, use_mini_mask=True) 5 6
log("original_image", original_image)
TypeError: load_image_gt() got an unexpected keyword argument 'use_mini_mask'
It's when I test on a random image:
# Test on a random image
image_id = random.choice(dataset_val.image_ids)
original_image, image_meta, gt_class_id, gt_bbox, gt_mask =\
modellib.load_image_gt(dataset_val, inference_config,
image_id, use_mini_mask=True)
Il lun 5 ott 2020, 14:57 Ignacio Amat <notifications@github.com> ha scritto:
… No, sorry @sirbastiano <https://github.com/SirBastiano>. Maybe @dsalnikov
<https://github.com/dsalnikov> can give you a hint on how he managed to
solve that problem.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2278 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARFBHLTZFMHIXL5JPAHSIZDSJG7D5ANCNFSM4OVWJATA>
.
|
You have to delete that parameter from model.py file as it is enabled by default in config.py as you can check in this issue |
Thank you very much. I almost completed the debugging.
Il lun 5 ott 2020, 15:22 Ignacio Amat <notifications@github.com> ha scritto:
… You have to delete that parameter from model.py file as it is enabled by
default in config.py
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2278 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARFBHLQG6QGZILFFBQZ66P3SJHCAZANCNFSM4OVWJATA>
.
|
Dear Ignacio, I've to ask you a question. I imported my own dataset and
masks but I get this error: 'Dataset' object non subscriptable. Do you know
what does this mean?
Il giorno lun 5 ott 2020 alle ore 19:42 Roberto Del Prete <
robertodelprete88@gmail.com> ha scritto:
… Thank you very much. I almost completed the debugging.
Il lun 5 ott 2020, 15:22 Ignacio Amat ***@***.***> ha
scritto:
> You have to delete that parameter from model.py file as it is enabled by
> default in config.py
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#2278 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ARFBHLQG6QGZILFFBQZ66P3SJHCAZANCNFSM4OVWJATA>
> .
>
|
My basic test was to run the /samples notebooks.
|
Hi @sirbastiano, what I think you are trying to do while getting this error is to index an object that doesn't have that functionality. Check that your Dataset object can be subscriptable in order to avoid this problem. Can you provide some more code and error traceback ? |
Solved, thanks Ignacio.
Il mer 14 ott 2020, 10:07 Ignacio Amat <notifications@github.com> ha
scritto:
… error: 'Dataset' object non subscriptable
Hi @sirbastiano <https://github.com/SirBastiano>, what I think you are
trying to do while getting this error is to index an object that doesn't
have that functionality. Check that your Dataset object can be
subscriptable in order to avoid this problem. Can you provide some more
code and error traceback ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2278 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARFBHLTXBOGJPQ7TXXO3AQ3SKVL5BANCNFSM4OVWJATA>
.
|
Hi @Ademord, this error means that in your current environment you don't have the keras module installed. Install it with conda |
I think I may have found another incompatibility in the utils module. When calling utils.compute_ap(), that ends up performing an np.dot() calculation, but the two masks given have a shape mismatch. I've looked through the Utils code, but I can't find a reason as to why downgrading TF results in a successful operation. This is briefly mentioned in #960 , and the suggested advice is to downgrade TF.
|
If anyone was looking for an alternative to this repo I moved to Detectron2 and saw even better performance in terms of speed and accuracy, so I would recommend it. |
Hi everyone! I'm using the TF 2.1.0 and keras 2.3.1 and I got this error: AttributeError: module 'tensorflow' has no attribute 'random_shuffle' May someone help me? |
No description provided.