I tried to write a Yolo by myself, but it seems to have many problems. Is there anyone who can help me?

I wrote a tensorflow version of Yolo based on the pytorch version of Yolo, but it seems to have many problems, including

1: I feel that my custom layer layer does not handle well. They do not seem to pass any variables?

2: When I start training, I will instantly run out of 2G video memory, but I don’t know what the problem is. I will batch_ Adjusting the size to 8 does not solve this problem. It seems that my model is wrong

3: When previewing my model, there is no output shape, and some params are also none. What is the problem? (as shown below)


I would be grateful if someone could give me some advice

and This is all my code, and the comments in it are all in Chinese, because almost all my comments indicate my inner thoughts at that time


sorry i was write one privet link , this is the github link https://github.com/jungyin/my-tensorflow-yolo-Under-development.git

I admit that 2G video memory is a little small, but 8 batch_ Size, the first time I run the first epoch, I report oom. It’s a bit too unusual. The eight pictures I use do not add up to 0.5gb

Try batchsize of 1 or 2.
Also, try this on Google Colab- they give you more memory.

Thank you for your advice. If I can’t find a cheap RTX graphics card (btc accident) in the later stage, I will try to use the method you mentioned