Giter Site home page Giter Site logo

Comments (7)

JVD9kh96 avatar JVD9kh96 commented on August 16, 2024 1

Hello. First of all, thank you for your amazing code. While trying to train the YOLOv3 model from scratch on yymnist dataset, I noticed that the loss is fluctuating between 20 and 40 and it doesn't converge. I didnt't change any of the config settings except the _C.YOLO.classes = "data/classes/voc.names" which I changed it to _C.YOLO.classes = "data/classes/yymnist.names". Am I doing something wrong?
I use tensorflow==2.5.0

I met the same situation,Have you solved?

I solved the problem by using tensorflow 2.2.0. It turned out that in tensorflow 2.5.0 which I was using, after the first prediction, the weights somehow got random and the only true prediction was for the first test image and then the weights got random. When I used tensorflow 2.2.0 the issue was solved. however, I was able to solve the issue in tensorflow 2.5.0 by freezing the weghts after loading the model.
I was gonna close the issue, so let me know if your problem is solved.

What command did you added and where? Thanks!

After you load the weights with model.set_weights(weights) or model.load_weights("path/to/weights"), just add the following command:
model.trainable = False

from tensorflow2.0-examples.

zimengxueying avatar zimengxueying commented on August 16, 2024

Hello. First of all, thank you for your amazing code. While trying to train the YOLOv3 model from scratch on yymnist dataset, I noticed that the loss is fluctuating between 20 and 40 and it doesn't converge. I didnt't change any of the config settings except the _C.YOLO.classes = "data/classes/voc.names" which I changed it to _C.YOLO.classes = "data/classes/yymnist.names". Am I doing something wrong?
I use tensorflow==2.5.0

I met the same situation,Have you solved?

from tensorflow2.0-examples.

JVD9kh96 avatar JVD9kh96 commented on August 16, 2024

Hello. First of all, thank you for your amazing code. While trying to train the YOLOv3 model from scratch on yymnist dataset, I noticed that the loss is fluctuating between 20 and 40 and it doesn't converge. I didnt't change any of the config settings except the _C.YOLO.classes = "data/classes/voc.names" which I changed it to _C.YOLO.classes = "data/classes/yymnist.names". Am I doing something wrong?
I use tensorflow==2.5.0

I met the same situation,Have you solved?

I solved the problem by using tensorflow 2.2.0. It turned out that in tensorflow 2.5.0 which I was using, after the first prediction, the weights somehow got random and the only true prediction was for the first test image and then the weights got random. When I used tensorflow 2.2.0 the issue was solved. however, I was able to solve the issue in tensorflow 2.5.0 by freezing the weghts after loading the model.

I was gonna close the issue, so let me know if your problem is solved.

from tensorflow2.0-examples.

mastergao57 avatar mastergao57 commented on August 16, 2024

Hello. First of all, thank you for your amazing code. While trying to train the YOLOv3 model from scratch on yymnist dataset, I noticed that the loss is fluctuating between 20 and 40 and it doesn't converge. I didnt't change any of the config settings except the _C.YOLO.classes = "data/classes/voc.names" which I changed it to _C.YOLO.classes = "data/classes/yymnist.names". Am I doing something wrong?
I use tensorflow==2.5.0

I met the same situation,Have you solved?

I solved the problem by using tensorflow 2.2.0. It turned out that in tensorflow 2.5.0 which I was using, after the first prediction, the weights somehow got random and the only true prediction was for the first test image and then the weights got random. When I used tensorflow 2.2.0 the issue was solved. however, I was able to solve the issue in tensorflow 2.5.0 by freezing the weghts after loading the model.

I was gonna close the issue, so let me know if your problem is solved.

When I run video_demo.py, I met the same problem. Only the first prediction is true, the others are nan. I guess the problem is in the 'utils.load_weights(model, "./yolov3.weights")'. How to solve the problem? I use tensorflow==2.7.0

from tensorflow2.0-examples.

giakou4 avatar giakou4 commented on August 16, 2024

Hello. First of all, thank you for your amazing code. While trying to train the YOLOv3 model from scratch on yymnist dataset, I noticed that the loss is fluctuating between 20 and 40 and it doesn't converge. I didnt't change any of the config settings except the _C.YOLO.classes = "data/classes/voc.names" which I changed it to _C.YOLO.classes = "data/classes/yymnist.names". Am I doing something wrong?
I use tensorflow==2.5.0

I met the same situation,Have you solved?

I solved the problem by using tensorflow 2.2.0. It turned out that in tensorflow 2.5.0 which I was using, after the first prediction, the weights somehow got random and the only true prediction was for the first test image and then the weights got random. When I used tensorflow 2.2.0 the issue was solved. however, I was able to solve the issue in tensorflow 2.5.0 by freezing the weghts after loading the model.

I was gonna close the issue, so let me know if your problem is solved.

What command did you added and where? Thanks!

from tensorflow2.0-examples.

JVD9kh96 avatar JVD9kh96 commented on August 16, 2024

Hello. First of all, thank you for your amazing code. While trying to train the YOLOv3 model from scratch on yymnist dataset, I noticed that the loss is fluctuating between 20 and 40 and it doesn't converge. I didnt't change any of the config settings except the _C.YOLO.classes = "data/classes/voc.names" which I changed it to _C.YOLO.classes = "data/classes/yymnist.names". Am I doing something wrong?
I use tensorflow==2.5.0

I met the same situation,Have you solved?

I solved the problem by using tensorflow 2.2.0. It turned out that in tensorflow 2.5.0 which I was using, after the first prediction, the weights somehow got random and the only true prediction was for the first test image and then the weights got random. When I used tensorflow 2.2.0 the issue was solved. however, I was able to solve the issue in tensorflow 2.5.0 by freezing the weghts after loading the model.
I was gonna close the issue, so let me know if your problem is solved.

When I run video_demo.py, I met the same problem. Only the first prediction is true, the others are nan. I guess the problem is in the 'utils.load_weights(model, "./yolov3.weights")'. How to solve the problem? I use tensorflow==2.7.0

One way that helped me fix this issue was down-grading tensorflow to 2.2.0. Another solution wich I found was freezing the weights after loading them. These two solutions was helpful for me.

from tensorflow2.0-examples.

giakou4 avatar giakou4 commented on August 16, 2024

Can you paste the command that freezes the weights?

from tensorflow2.0-examples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.