Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to understan the parameters in theapplication_resnet50() model?#1482

danli349 started this conversation inGeneral
Discussion options

Hello:

model <- application_resnet50(weights = "imagenet")summary(model)

In the input layer theOutput Shape is(None, 224, 224, 3)
In theconv1_conv layer, why theOutput Shape is(None, 112, 112, 64)?
There is no max pooling layer before it.
Does it omit a (2, 2) max pooling layer, or is the kernel step size 2?
And the kernel size should be (7, 7), right?
How does theconv2_block1_1_bn(BatchNormalization) work layer work? why the parameters are 256?

Thanks a lot

image

You must be logged in to vote

Replies: 1 comment 1 reply

Comment options

The firstconv1_conv layer is configured withstride=2.
https://github.com/keras-team/keras/blob/c8c2c6fc7585a56ca8c8dfd084f5dadad6ad1036/keras/src/applications/resnet.py#L152

One way towards answering the second question is to directly inspect the weights of the layer:

get_layer(model,"conv2_block1_1_bn")$weightsget_layer(model,"conv2_block1_1_bn")$weights|> sapply(\(w) setNames(list(w$shape),w$name))
$gammaTensorShape([64])$betaTensorShape([64])$moving_meanTensorShape([64])$moving_varianceTensorShape([64])

Please take a look at the reference page forlayer_batch_normalization() for a description of how the different weight tensors are applied.

You must be logged in to vote
1 reply
@danli349
Comment options

@t-kalinowski Thanks a lot

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
General
Labels
None yet
2 participants
@danli349@t-kalinowski

[8]ページ先頭

©2009-2025 Movatter.jp