MCPcopy
hub / github.com/tensorflow/tfjs / constructor

Method constructor

tfjs-layers/src/models.ts:401–417  ·  view source on GitHub ↗
(args?: SequentialArgs)

Source from the content-addressed store, hash-verified

399 static override className = 'Sequential';
400 private model: LayersModel;
401 constructor(args?: SequentialArgs) {
402 super({inputs: [], outputs: []});
403 args = args || {};
404
405 this.trainable = true;
406 this.built = false;
407
408 // Set model name.
409 this.name = (args.name != null) ? args.name : getUid('sequential_');
410
411 // Add to the model any layers passed to the constructor.
412 if (args.layers != null) {
413 for (const layer of args.layers) {
414 this.add(layer);
415 }
416 }
417 }
418
419 // Helper function to Sequential.add Throws if the new output shape will be
420 // invalid.

Callers

nothing calls this directly

Calls 2

addMethod · 0.95
getUidFunction · 0.90

Tested by

no test coverage detected