Viredery / tf-eager-fasterrcnn

Faster R-CNN R-101-FPN model was implemented with TensorFlow2.0 eager execution.
MIT License
89 stars 46 forks source link

Problems in inspect_model.ipynb #7

Closed kuailedagongzai closed 4 years ago

kuailedagongzai commented 4 years ago

I get my jupyter restart when i excute ' _ = model((batch_imgs, batch_metas), training=False) ',after dataset loaded. If i don't excute this line ,i got a error in load weights procedure. The sreenshots of these problems are as belows. problem1 problem2

Viredery commented 4 years ago

Hi @kuailedagongzai

This is how eager mode works in TensorFlow2.

If you don't run the network at first, this model wouldn't know the structure of network, causing this "a model with 0 layers" problem.

kuailedagongzai commented 4 years ago

Thanks for advices,but everytime i try to feed the data into the model,my jupyter will restart.How could i avoid this situation?By the way, I tried this scripts in vscode ,then my vscode restart. I stored the data in anothor directory , so i made a little modification to coco.py .Does this matter ?These are my modifications. modification1 modification2

Viredery commented 4 years ago

Maybe you could check out your GPU memory? One reason to cause this crash is OOM.

You can try this scripts in Terminal and figure it out~

kuailedagongzai commented 4 years ago

Actually,the GPU in my notebook could not be used. Therefore , i use CPU only. There are 12G memory in my systerm.And when i run this script in the terminal ,it report a 'Segmentation fault' fault

Viredery commented 4 years ago

It can't work in my CPU either. Maybe it's a bug?

Viredery commented 4 years ago

I fix this bug in this commit

Now the weight initialization method is Xavier(default) instead of He