Closed 666zcli closed 5 years ago
Hi, @666zcli
Thank you for pointing this out!
I did modify the original prototxt files to correspond with the variable name (e.g., feature_layer) in data/extract_feature.py
(and forgot to remind you!). For example, from the line#5906 to the last line in inception_v3_kinetics_pretrained/inception_v3_rgb_deploy.prototxt
, I change the layer name of top_cls_pool
and top_cls_global_pool
to global_pool
and remove top_cls_drop
layer and fc_action
layer for feature extraction as follows:
layer {
name: "top_cls_pool"
type: "Pooling"
bottom: "mixed_10_join"
top: "top_cls_global_pool"
pooling_param {
pool: AVE
kernel_size: 8
stride: 1
pad: 0
}
}
layer {
name: "top_cls_drop"
type: "Dropout"
bottom: "top_cls_global_pool"
top: "top_cls_drop"
dropout_param {
dropout_ratio: 0.699999988079
}
}
layer {
name: "fc_action"
type: "InnerProduct"
bottom: "top_cls_drop"
top: "fc_action"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 1.0
decay_mult: 2.0
}
inner_product_param {
num_output: 400
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
to
layer {
name: "global_pool"
type: "Pooling"
bottom: "mixed_10_join"
top: "global_pool"
pooling_param {
pool: AVE
kernel_size: 8
stride: 1
pad: 0
}
}
#layer {
# name: "top_cls_drop"
# type: "Dropout"
# bottom: "global_pool"
# top: "top_cls_drop"
# dropout_param {
# dropout_ratio: 0.699999988079
# }
#}
#layer {
# name: "fc-action"
# type: "InnerProduct"
# bottom: "top_cls_drop"
# top: "fc-action"
# param {
# lr_mult: 1.0
# decay_mult: 1.0
# }
# param {
# lr_mult: 1.0
# decay_mult: 2.0
# }
# inner_product_param {
# num_output: 400
# weight_filler {
# type: "xavier"
# }
# bias_filler {
# type: "constant"
# value: 0.0
# }
# }
#}
I have made a commit to upload the prototxt files I used for your reference. Directly use these files should be fine, otherwise please reopen this issue : )
Hi, yupan I try to use your codes on activitynet. And when I used the extract_feature.py to extract features, I downloaded the pretrained model KnetV3 from the link you provided. In your code, the last layer seemed to be 'global_pool', but I could not find "global_pool" in prototxt file. Could you help me?