Skip to main content
CrystalDocs
Search documentation
Search
Browse Docs
CrystalShards
About
class
MicroGPT::CharDataset
Inherits
Reference
<
Object
Constructors
new
(text :
String
, stride :
Int32
= 0)
Source
Instance methods
char_to_id
Source
chars
Source
data
Source
decode
(ids :
Array
(
Int32
)) :
String
Source
encode
(text :
String
) :
Array
(
Int32
)
Source
epoch
Source
id_to_char
Source
sample
(seq_len :
Int32
, lookahead :
Int32
= 0) :
Tuple
(
Array
(
Int32
),
Array
(
Array
(
Int32
)))
Source
stride
Source
vocab_size
Source