-
-
Notifications
You must be signed in to change notification settings - Fork 333
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
[WIP] ResNet-18 #221
base: master
Are you sure you want to change the base?
[WIP] ResNet-18 #221
Conversation
Might be better as a PR to Metalhead, to make it capable of emitting common |
MeanPool((7,7)), | ||
x -> reshape(x, :, size(x,4)), | ||
Dense(512*1, 10), | ||
softmax, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should remove the softmax here since you are using logicrossentropy
end | ||
|
||
|
||
loss(x, y) = sum(logitcrossentropy(m(x), y)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm not wrong, logitcrossentropy
already performs reduction, no need for sum
SkipConnection(identity_layer(512), (variable_1, variable_2) -> variable_1 + variable_2), | ||
MeanPool((7,7)), | ||
x -> reshape(x, :, size(x,4)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't these anonymous functions have names?
SkipConnection(identity_layer(512), (variable_1, variable_2) -> variable_1 + variable_2), | |
MeanPool((7,7)), | |
x -> reshape(x, :, size(x,4)), | |
SkipConnection(identity_layer(512), +), | |
MeanPool((7,7)), | |
Flux.flatten, | |
Created ResNet-18 for Flux. It does function but still needs some work. Has issues with speed and memory consumption. Feedback would be appreciated.