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

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])
主站蜘蛛池模板: 嘉义市| 罗甸县| 澄城县| 衡山县| 湘潭县| 乐昌市| 晴隆县| 西畴县| 澄城县| 汉源县| 遵义县| 宝丰县| 中牟县| 杭州市| 农安县| 盘山县| 同心县| 永昌县| 苍南县| 宝山区| 大埔区| 揭东县| 梅河口市| 阳曲县| 图木舒克市| 安多县| 保山市| 北流市| 库伦旗| 永登县| 儋州市| 西宁市| 扶余县| 东丽区| 繁昌县| 大英县| 乌什县| 娱乐| 巨野县| 雅江县| 南岸区|