While fitting my model i am getting this error that
No. Of channel inherent in the image must be 1,3,4 found 2.
Pls help me with this error.
I don’t understand what this error is about.
Until my model.fit my every cell is correct and runs without any error.
Pls explain and suggest any solution.
It looks like you must be running locally, since there is no /usr/local/lib/python3.7 in the notebook environment. If you are running locally, you are probably using different versions of TF and lots of other things. There is no guarantee that the notebook code will run with some random version of the support packages it depends on. We do not have “official” instructions for how to do this, but here’s a thread from a fellow student with lots of useful instructions. But as you’ll see from a quick scan of that thread, these are deep waters. Be warned: There Be Dragons!
That’s useful to know. I have not tried that. There is no guarantee that it works for the same “versionitis” reasons. The first question would be whether you can use TF 2.3.0 in the context of Colab, as opposed to whatever the latest version is that they are running. Then you’ve got to deal with differences in all the other packages.
If you figure out how to get this to work, it would be a public service if you could let us know your recipe. Thanks!
We have seen errors before when people try to run on TF 2.6 instead of 2.3. I don’t remember if they were exactly the same as the error you show. Try running the same code on the course website. If that works, then that’s a pretty good indication that it’s an environment problem.
@user344#fit the model
r = model.fit_generator(train_set,validation_data=test_set,epochs=4,steps_per_epoch=len(train_set),validation_steps=len(test_set))
try this code and run it if you face any further error they inform .
This error usually pops up in tensorflow decode_bmp(…) function. I had workaround this replacing the input data format in a different project, but as others have pointed out its mostly due to version mismatch in packages.