* Generates output predictions for the input samples. * * Computation is done in batches. * * Note: the "step" mode of predict() is currently not supported. * This is because the TensorFlow.js core backend is imperative only. * * ```js * const model = tf.sequential({ *
(x: Tensor|Tensor[], args: ModelPredictArgs = {})
| 784 | * @doc {heading: 'Models', subheading: 'Classes'} |
| 785 | */ |
| 786 | override predict(x: Tensor|Tensor[], args: ModelPredictArgs = {}): |
| 787 | Tensor|Tensor[] { |
| 788 | if (this.model == null) { |
| 789 | this.build(); |
| 790 | } |
| 791 | return this.model.predict(x, args); |
| 792 | } |
| 793 | |
| 794 | /** |
| 795 | * Returns predictions for a single batch of samples. |