繁体   English   中英

Python 中的包装器是什么?

[英]What is a wrapper in Python?

我目前正在学习深度学习模块 Keras。

我遇到了一个我无法理解的句子,因为我不知道 python Wrapper 是什么。

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用于训练和运行 model。”

在上面的句子中,什么是 Python 包装器,它有什么作用?

这不是 Python 独有的。 在这种情况下, Sequential是一个助手 class,它提供了使创建这种特定类型的神经网络 model 更容易的方法。 它从其父 class 继承了许多属性,这是一个通用的Model 有关更多信息,请参阅来源

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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