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

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])
主站蜘蛛池模板: 漳州市| 阜阳市| 休宁县| 莫力| 灵宝市| 噶尔县| 冕宁县| 甘谷县| 阿拉善盟| 西峡县| 江西省| 扎鲁特旗| 宁德市| 闽清县| 印江| 宜兰县| 三原县| 玉林市| 彭州市| 巴彦淖尔市| 鹰潭市| 金川县| 句容市| 乐陵市| 洛隆县| 牡丹江市| 彭山县| 峨眉山市| 灵山县| 溧水县| 卢龙县| 景宁| 沧州市| 特克斯县| 陆良县| 馆陶县| 通州区| 特克斯县| 柘荣县| 九台市| 沁水县|