Skip to content

Update model.fit docs to indicate what the default params are #1846

@ToonTalk

Description

@ToonTalk

https://github.com/tensorflow/tfjs-examples/blob/master/webcam-transfer-learning/index.js says

// Train the model! Model.fit() will shuffle xs & ys so we don't have to.

model.fit(controllerDataset.xs, controllerDataset.ys, {
  batchSize,
  epochs: ui.getEpochs(),
  callbacks: {
    onBatchEnd: async (batch, logs) => {
      ui.trainStatus('Loss: ' + logs.loss.toFixed(5));
    }
  }
});
}

While the documentation for fit says only the following regarding shuffling:

shuffle (boolean) Whether to shuffle the training data before each epoch. Has no effect when stepsPerEpoch is not null.

Unless "shuffle" is true by default (which should be well-documented if somehow true) then comment on example code is incorrect.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions