Row 56072

Row ID: 56072 | Dataset Entry | Axioma AXP Content Repository

Content Data

This page contains data entry 56072 from the Axioma AXP content repository. The structured data below represents the complete record for this entry.

I'm on a binary image classification model(sigmoid activation)

train, test, val data are already in separated folders

I loaded the test data and got y\_pred and y\_true as following There seems to be an error, as

`model.evaluate(test_generator)` shows 93% accuracy

while `accuracy_score((y_pred, y_true)` shows only 61%

It seems there's some error while getting y\_true or y\_pred.

Help me.

test_datagen = ImageDataGenerator(rescale=1.0/255)

test_generator = val_test_datagen.flow_from_directory( '/content/chest_xray/test', target_size=(IMAGE_SIZE, IMAGE_SIZE), batch_size=32, class_mode='sparse' )

y_pred_probs = model.predict(test_generator)

y_pred_classes = (y_pred_probs > 0.5).astype(int) y_pred = y_pred_classes.flatten()

y_true = test_generator.classes

FieldValue
text I'm on a binary image classification model(sigmoid activation) train, test, val data are already in separated folders I loaded the test data and got y\_pred and y\_true as following There seems to be an error, as `model.evaluate(test_generator)` shows 93% accuracy while `accuracy_score((y_pred, y_true)` shows only 61% It seems there's some error while getting y\_true or y\_pred. Help me. test_datagen = ImageDataGenerator(rescale=1.0/255) test_generator = val_test_datagen.fl…
label r/deeplearning
dataType post
communityName r/deeplearning
datetime 2024-05-23
username_encoded Z0FBQUFBQm5Lak1XMURZRjc1Zzk5LUhtZlJWaVVJRzlxZHFvWUFwT3pvZXdRV2NVMl9iR3MzR0QtSEZpVFVNZ0t5ZzgxZUpkVlBnZ0dPeTZzOFpYdlRoeGlFME0wV0VhR0tCVlI3aHBrX2ZuOUQ0eU02NDNDeDQ9
url_encoded Z0FBQUFBQm5Lak9tNVRlTVg0YmotZ2lMOXpqUmozRjZRaFJYSHpPaE5qODI2MnU5SWR6MG5hUjFIVTNiR1l3QnUyRndmVWlIeGREQzVsMHBNdXZPTDR0ZW5GZUtBeGZtRlFCR2t4dDVFS3RhSjEwQ3BMUU4tMDI4LTFLbTdyRE1IZ0ZGODF6UktQbjljUnZXdHNZNTdXVHNwNnhIMzc1ZllKSXNiWlIxNDJqTVdud0hrV281ZlpXNlAzNFdjcDZLZHJLaHVFaVZDSDJYWmM3dWdmSEVqX2R4akxEaG5MZF9NZz09

Raw Record

{
  "text": "I'm on a binary image classification model(sigmoid activation)\n\ntrain, test, val data are already in separated folders\n\nI loaded the test data and got y\\_pred and y\\_true as following  \nThere seems to be an error, as \n\n`model.evaluate(test_generator)` shows 93% accuracy\n\nwhile `accuracy_score((y_pred, y_true)` shows only 61%\n\nIt seems there's some error while getting y\\_true or y\\_pred.\n\nHelp me.  \n\n\n    test_datagen = ImageDataGenerator(rescale=1.0/255)\n\n    test_generator = val_test_datagen.flow_from_directory(\n        '/content/chest_xray/test',\n        target_size=(IMAGE_SIZE, IMAGE_SIZE),\n        batch_size=32,\n        class_mode='sparse'\n    )\n\n    y_pred_probs = model.predict(test_generator)\n\n    y_pred_classes = (y_pred_probs > 0.5).astype(int)\n    y_pred = y_pred_classes.flatten()\n\n    y_true = test_generator.classes",
  "label": "r/deeplearning",
  "dataType": "post",
  "communityName": "r/deeplearning",
  "datetime": "2024-05-23",
  "username_encoded": "Z0FBQUFBQm5Lak1XMURZRjc1Zzk5LUhtZlJWaVVJRzlxZHFvWUFwT3pvZXdRV2NVMl9iR3MzR0QtSEZpVFVNZ0t5ZzgxZUpkVlBnZ0dPeTZzOFpYdlRoeGlFME0wV0VhR0tCVlI3aHBrX2ZuOUQ0eU02NDNDeDQ9",
  "url_encoded": "Z0FBQUFBQm5Lak9tNVRlTVg0YmotZ2lMOXpqUmozRjZRaFJYSHpPaE5qODI2MnU5SWR6MG5hUjFIVTNiR1l3QnUyRndmVWlIeGREQzVsMHBNdXZPTDR0ZW5GZUtBeGZtRlFCR2t4dDVFS3RhSjEwQ3BMUU4tMDI4LTFLbTdyRE1IZ0ZGODF6UktQbjljUnZXdHNZNTdXVHNwNnhIMzc1ZllKSXNiWlIxNDJqTVdud0hrV281ZlpXNlAzNFdjcDZLZHJLaHVFaVZDSDJYWmM3dWdmSEVqX2R4akxEaG5MZF9NZz09"
}

Entry Information