본문 바로가기
Computer/ML·DL·NLP

Sequential Model 이란?

by injeolmialmond 2022. 7. 1.
model = Sequential()

python - What is meant by sequential model in Keras - Stack Overflow

 

What is meant by sequential model in Keras

I have recently started working Tensorflow for deep learning. I found this statement model = tf.keras.models.Sequential() bit different. I couldn't understand what is actually meant and is there any

stackoverflow.com

There are two ways to build Keras models: sequential and functional.

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

Alternatively, the functional API allows you to create models that have a lot more flexibility as you can easily define models where layers connect to more than just the previous and next layers. In fact, you can connect layers to (literally) any other layer. As a result, creating complex networks such as siamese networks and residual networks become possible.

for more details visit : https://machinelearningmastery.com/keras-functional-api-deep-learning/

 

How to Use the Keras Functional API for Deep Learning

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 in that it does not allow you to create models that share layers or have multiple inp

machinelearningmastery.com

 

 

The Sequential model (keras.io)

 

Keras documentation: The Sequential model

» Developer guides / The Sequential model The Sequential model Author: fchollet Date created: 2020/04/12 Last modified: 2020/04/12 Description: Complete guide to the Sequential model. View in Colab • GitHub source Setup import tensorflow as tf from tens

keras.io

When to use a Sequential model

A Sequential model is appropriate for a plain stack of layers where each layer has exactly one input tensor and one output tensor.

 

A Sequential model is not appropriate when:

  • Your model has multiple inputs or multiple outputs
  • Any of your layers has multiple inputs or multiple outputs
  • You need to do layer sharing
  • You want non-linear topology (e.g. a residual connection, a multi-branch model)

 

댓글