- Mastering TensorFlow 1.x
- Armando Fandango
- 124字
- 2021-06-25 22:51:03
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])
推薦閱讀
- 新型電腦主板關(guān)鍵電路維修圖冊(cè)
- 電腦維護(hù)與故障排除傻瓜書(Windows 10適用)
- 計(jì)算機(jī)應(yīng)用與維護(hù)基礎(chǔ)教程
- 分布式系統(tǒng)與一致性
- Creating Flat Design Websites
- 基于PROTEUS的電路設(shè)計(jì)、仿真與制板
- RISC-V處理器與片上系統(tǒng)設(shè)計(jì):基于FPGA與云平臺(tái)的實(shí)驗(yàn)教程
- 微服務(wù)實(shí)戰(zhàn)
- USB應(yīng)用開發(fā)寶典
- 微服務(wù)架構(gòu)基礎(chǔ)(Spring Boot+Spring Cloud+Docker)
- 從企業(yè)級(jí)開發(fā)到云原生微服務(wù):Spring Boot實(shí)戰(zhàn)
- 零基礎(chǔ)輕松學(xué)修電腦主板
- 微服務(wù)架構(gòu)實(shí)戰(zhàn):基于Spring Boot、Spring Cloud、Docker
- 超炫的35個(gè)Arduino制作項(xiàng)目
- 新編計(jì)算機(jī)組裝與維護(hù)