function Sequential(args) {
	    var _this;

	    _this = _LayersModel.call(this, {
	      inputs: [],
	      outputs: []
	    }) || this;
	    args = args || {};
	    _this.trainable = true;
	    _this.built = false; // Set model name.

	    _this.name = args.name != null ? args.name : getUid('sequential_'); // Add to the model any layers passed to the constructor.

	    if (args.layers != null) {
	      for (var _iterator = _createForOfIteratorHelperLoose(args.layers), _step; !(_step = _iterator()).done;) {
	        var layer = _step.value;

	        _this.add(layer);
	      }
	    }

	    return _this;
	  } // Helper function to Sequential.add  Throws if the new output shape will be
A model with a stack of layers, feeding linearly from one to the next.

`tf.sequential` is a factory function that creates an instance of
`tf.Sequential`.

```js
 // Define a model for linear regression.
 const model = tf.sequential();
 model.add(tf.layers.dense({units: 1, inputShape: [1]}));

 // Prepare the model for training: Specify the loss and the optimizer.
 model.compile({loss: 'meanSquaredError', optimizer: 'sgd'});

 // Generate some synthetic data for training.
 const xs = tf.tensor2d([1, 2, 3, 4], [4, 1]);
 const ys = tf.tensor2d([1, 3, 5, 7], [4, 1]);

 // Train the model using the data then do inference on a data point the
 // model hasn't seen:
 await model.fit(xs, ys);
 model.predict(tf.tensor2d([5], [1, 1])).print();
```

@doc {heading: 'Models', subheading: 'Classes'}