官术网_书友最值得收藏!

Functional API for creating the Keras model

In the functional API, you create the model as an instance of the Model class that takes an input and output parameter. The input and output parameters represent one or more input and output tensors, respectively.

As an example, use the following code to instantiate a model from the functional API:

model = Model(inputs=tensor1, outputs=tensor2)

In the above code, tensor1 and tensor2 are either tensors or objects that can be treated like tensors, for example, Keras layer objects.

If there are more than one input and output tensors, they can be passed as a list, as shown in the following example:

model = Model(inputs=[i1,i2,i3], outputs=[o1,o2,o3])
主站蜘蛛池模板: 石门县| 蒙阴县| 楚雄市| 望都县| 饶平县| 乐山市| 福州市| 寻乌县| 巴彦淖尔市| 稻城县| 湖口县| 虎林市| 嘉禾县| 民权县| 白山市| 安多县| 邻水| 田阳县| 镇康县| 中山市| 灵山县| 杭州市| 奇台县| 尼木县| 信丰县| 叶城县| 清涧县| 汉源县| 长汀县| 忻州市| 桐城市| 通化市| 彭泽县| 梓潼县| 金平| 通许县| 城步| 蒲城县| 沛县| 灵宝市| 庆元县|