Skip to content

Commit

Permalink
Merge pull request karpathy#471 from karpathy/feature/resume
Browse files Browse the repository at this point in the history
resume training v1
  • Loading branch information
karpathy authored May 27, 2024
2 parents 3b4d8be + 24a8c03 commit b67880a
Show file tree
Hide file tree
Showing 3 changed files with 189 additions and 46 deletions.
4 changes: 2 additions & 2 deletions dataloader.h
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,8 @@ int evalloader_stat_losses(EvalLoader *loader, float* losses) {
// iterate the examples in this batch
int can_fit_examples = B / ASSUMED_NUM_COMPLETIONS;
for (int i = 0; i < can_fit_examples; i++) {
float min_loss;
int min_loss_index;
float min_loss = 0.0f;
int min_loss_index = -1;
char active = 0; // is this example active or fully empty?
// iterate the completions in this example
for (int b = 0; b < ASSUMED_NUM_COMPLETIONS; b++) {
Expand Down
2 changes: 1 addition & 1 deletion rand.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ void normal_(float* data, unsigned int numel, float mean, float std, mt19937_sta
normal_fill(data, numel, mean, std, state);
}
else {
double next_double_normal_sample;
double next_double_normal_sample = 0.0; // make compiler warning happy, won't be used
int has_next_double_normal_sample = 0;
for (unsigned int t = 0; t < numel; t++) {
if (has_next_double_normal_sample) {
Expand Down
Loading

0 comments on commit b67880a

Please sign in to comment.