[Python] Image classification Using CNN [closed]

Discussão em 'Python' iniciado por Stack, Março 31, 2025.

  1. Stack

    Stack Membro Participativo

    I am working on breast cancer classification. I found this online code to train my pre-processed outputs on it. The results was awful but I didn't understand the code, I want to train my own model but I don't how to replace my own code with this one.

    Any help would be appreciated.

    in_model = tf.keras.applications.DenseNet121(input_shape=(224,224,3),
    include_top=False,
    weights='imagenet',classes = 2)
    in_model.trainable = False
    inputs = tf.keras.Input(shape=(224,224,3))
    x = in_model(inputs)
    flat = Flatten()(x)
    dense_1 = Dense(4096,activation = 'relu')(flat)
    dense_2 = Dense(4096,activation = 'relu')(dense_1)
    prediction = Dense(2,activation = 'softmax')(dense_2)
    in_pred = Model(inputs = inputs,outputs = prediction)

    Continue reading...

Compartilhe esta Página