Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keras Learning Won't Start Training

I am trying to train a model to recognize different cloud types and select the area where those clouds are located. To do this, I am sending an image file(350*550, grayscale) to a model, which outputs which pixels are to be selected(350*550). I have attached a link to my code below. This is part of a competition with Kaggle (https://www.kaggle.com/c/understanding_cloud_organization/data), and I am not looking for someone to rewrite my entire code.

When trying to train my data, the data is loaded and then sent to the model to be fit. Then I get a bunch of lines from tensorflows bfc allocation, which quits after a few minutes with no obvious error(for me, at least). I'm really at a loss on what to do.

Code: https://github.com/abritton99999999/KaggleCode Console output is posted in the github as well now!

Some error code

More errors

like image 335
Austin Britton Avatar asked Feb 26 '26 19:02

Austin Britton


1 Answers

You're trying to create a very large tensor (50000x192500 floats) and are exceeding memory limits. Some suggestions for workarounds are here Tensorflow Error: "Cannot parse tensor from proto"

Essentially you're not going to be able to create a network like this

model.add(Dense(100000, input_shape=(192500,), activation="sigmoid"))
model.add(Dense(50000, activation="sigmoid"))
model.add(Dense(192500, activation="softmax"))

Instead you'll need to use convolutional layers

like image 118
Colin Torney Avatar answered Mar 01 '26 09:03

Colin Torney