Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

Problem in storing output in Practice Problem: Intel Scene Classification Challenge

$
0
0

@ni3_k wrote:

I have trained my base model for Intel Scene Classification Challenge and it is showing 0.82 on the validation set. But when I am submitting the output to solution checker, it is only giving me 0.15-0.16. I am using ImageDataGenerator class in keras, and I doubt the problem is caused by it when using it for prediction of test set. Can anybody help me with it.
Here is the code I am using:

test = pd.read_csv(“sample_submission_CH2mq5Z.csv”)
test_datagen=ImageDataGenerator(rescale=1./255.)
test_generator=test_datagen.flow_from_dataframe(dataframe=test,
directory="./train/",
x_col=“image_name”,
y_col=None,
target_size=(IMG_SIZE, IMG_SIZE),
seed=42,
shuffle=False,
batch_size=1,
class_mode=None)
test_generator.reset()
predictions=model.predict_generator(test_generator,verbose=1)
filenames=test_generator.filenames
results=pd.DataFrame({“image_name”:filenames,
“label”:predictions})
results.to_csv(“results.csv”,index=False)

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles