encodeBatch method

List<List<double>> encodeBatch(
  1. List<String> texts
)

Batch-encodes multiple texts into a batchSize, maxLength tensor.

Implementation

List<List<double>> encodeBatch(List<String> texts) {
  return texts.map((t) => encodeAsTensor(t)[0]).toList();
}