Classes | |
class | BigramLanguageModel |
Functions | |
main () | |
get_batch (split, train_data, val_data) | |
new version of get_batch that allows for model to be loaded to gpus | |
estimate_loss (model, train_data, val_data) | |
Variables | |
int | batch_size = 256 |
int | block_size = 8 |
int | max_iters = 100000 |
int | eval_interval = 100 |
int | learning_rate = 1e-2 |
str | device = "cpu" |
int | eval_iters = 200 |
int | n_embd = 32 |
bigram.Bigram.estimate_loss | ( | model, | |
train_data, | |||
val_data ) |
Definition at line 138 of file Bigram.py.
References get_batch().
Referenced by main().
bigram.Bigram.get_batch | ( | split, | |
train_data, | |||
val_data ) |
new version of get_batch that allows for model to be loaded to gpus
The previous version of get_batch in the Tensor_Prac doesn't have the ability for the GPU to actualy be used, even if the device is present. So this new version will take advantage of that hardware.
split | string either 'train' or 'val' which is used to pick data to batch with |
train_data | the data that is split for training |
val_data | the data that is split for validation |
Definition at line 114 of file Bigram.py.
Referenced by estimate_loss(), and main().
bigram.Bigram.main | ( | ) |
Definition at line 55 of file Bigram.py.
References estimate_loss(), and get_batch().