Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fully connected working better than CNN? #50

Closed
Cassiano-Silva opened this issue Feb 28, 2020 · 2 comments
Closed

Fully connected working better than CNN? #50

Cassiano-Silva opened this issue Feb 28, 2020 · 2 comments

Comments

@Cassiano-Silva
Copy link

Hi there,

it's more a question, not sure if it's an issue.

In Lab2 Part 1, two network types are analyzed: Fully Connected and CNN.
testing both with the test images show much better results with Fully then with CNN.
I tried changing parameters (learning rate and optimizer) but it didn't change so much the results.

CNN showed 8 correct estimations out of 20 test images.
Fully showed 19 correct estimations out of 20 test images.

I was expecting CNN to show better results, I thought it was more appropriate for vision applications.
Did I do something wrong?

Thanks and regards,

Cassiano

@niranth-s
Copy link
Contributor

This dataset is a very small one 28X28(ie 784 pixels) which is very less as compared to the pictures we use daily.
If you use the same dense network for a 256X256 image, you will see the performance of CNN is far better than a simple fully connected network.
Even in MNIST, with proper optimizer and loss, CNN works slightly better than fully connected.
(Use optimizer='adam', loss='sparse_categorical_crossentropy')

@aamini
Copy link
Owner

aamini commented Mar 11, 2020

Echoing @NiranthS's comments. For larger images the difference will be even larger but even for MNIST you should be seeing a fairly large difference already. Your results 8/20 for CNN and 19/20 for Dense indicate that you have an bug in your code for the CNN model or training. I suggest debugging the CNN to see where the error is.

@aamini aamini closed this as completed Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants