Struct tch::data::TextData [−][src]
pub struct TextData { /* fields omitted */ }
Expand description
Text data holder.
Implementations
Creates a text dataset from a file.
Returns the number of different characters/labels used by the dataset.
pub fn iter_shuffle(&self, seq_len: i64, batch_size: i64) -> TextDataIterⓘNotable traits for TextDataIterimpl Iterator for TextDataIter type Item = Tensor;
pub fn iter_shuffle(&self, seq_len: i64, batch_size: i64) -> TextDataIterⓘNotable traits for TextDataIterimpl Iterator for TextDataIter type Item = Tensor;
Notable traits for TextDataIter
impl Iterator for TextDataIter type Item = Tensor;
Returns a batch iterator over the dataset. Each sample is made of seq_len characters.