Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

deep learning - Explain concept of instantiating a model with another model as argument? VGGFace(model='resnet50', include_top=False)

I came across this line of code:

VGGFace(model='resnet50', include_top=False)

Could someone please explain to what this means? From my knowledge, VGGFace is a model trained to recognise faces, and then it accepts another model as an argument. So do we have two models? I am confused.

Thanks in advance.

question from:https://stackoverflow.com/questions/65942486/explain-concept-of-instantiating-a-model-with-another-model-as-argument-vggface

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

In fact it does recognizes faces, but the model parameter is used to specify which architecture is used, in this case resnet50, see: https://github.com/rcmalli/keras-vggface#available-models.

Don't know much about resnet50, but it's a residual network and that means that one of the earliest layers (usually the input) is feed back into the network in a later layer as a technique to increase accuracy on big networks (this one has ~150 layers).

More details: https://arxiv.org/abs/1512.03385


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...