The Keras functional API for Deep Learning__keras

Source: Internet
Author: User
Tags keras

The Keras Python Library makes creating deep learning models fast and easy.

The sequential API allows you to create models Layer-by-layer for most problems. It is limited the it does not allow the to create models that share layers or have multiple inputs or outputs.

The functional API in Keras is a alternate way of creating models, offers a lot flexibility more complex models.

In this tutorial, you'll discover how to use the more flexible functional API in Keras to define deep learning.

After completing this tutorial, you'll know:the difference between the sequential and functional APIs. How to define simple multilayer perceptron, convolutional neural network, and recurrent neural network using the FU Nctional API. How to define more complex models with shared layers and multiple inputs and outputs.

Let ' s get started. Tutorial Overview

This tutorial was divided into 6 parts; They are:keras sequential Models keras functional Models-Standard network Models Shared Layers Model multiple Input and O Utput Models Best Practices 1. Keras Sequential Models

As a review, Keras provides a sequential model API.

This is a way of creating deep learning models where a instance to the sequential class is created and model layers are C Reated and added to it.

For example, the layers can is defined and passed to the sequential as a array:

1 2 3 From Keras. Models import sequential from Keras. Layers Import Dense model = sequential ([Dense (2, Input_dim = 1), dense (1)])

Layers can also be added piecewise:

/table>
1 2 3 4 5 from Keras. Models import sequential

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.