Skip to content

Commit

Permalink
Update creating_model_git.py
Browse files Browse the repository at this point in the history
  • Loading branch information
NHLOCAL committed Jul 29, 2024
1 parent 820acd5 commit 73ac5f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions machine-learn/creating_model_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ def custom_tokenizer(nlp):
#lr_decay = 0.95 # קצב דעיכת שיעור הלמידה
# optimizer.learn_rate = initial_lr

for i in range(n_iter):
for itn in range(n_iter):
random.shuffle(training_data)
batches = minibatch(training_data, size=batch_sizes)
losses = {}
for batch in batches:
nlp.update(batch, drop=0.3, losses=losses)
print(f"Iteration {i}, Losses: {losses}")
print(f"Iteration {itn}, Losses: {losses}")
iteration_data[itn] = losses.copy()

current_loss = losses.get('ner', float('inf'))
Expand Down

0 comments on commit 73ac5f2

Please sign in to comment.