Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
868 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 Reply

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...