简体   繁体   中英

What is a wrapper in Python?

I am currently in the process of learning Keras, a Deep Learning module.

I came across a sentence that I can't understand because I don't know what a python Wrapper is.

from keras.models import Sequential

#Create the Sequential model
model = Sequential() 

"The keras.models.Sequential class is a wrapper for the neural network model that treats the network as a sequence of layers. It implements the Keras model interface with common methods like compile(), fit(), and evaluate() that are used to train and run the model."

In the above sentence, what is a Python wrapper and what does it do?

This is not unique to Python. In this case, Sequential is a helper class that provides methods to make the creation of this specific type of neural network model easier. It inherits many properties from its parent class, which is a generic Model . See the source for more info.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM