Skip to content

Commit eaa86d8

Browse files
committed
translate comment
1 parent 35464da commit eaa86d8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

docs/source/ko/perplexity.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,8 @@ for begin_loc in tqdm(range(0, seq_len, stride)):
114114
with torch.no_grad():
115115
outputs = model(input_ids, labels=target_ids)
116116

117-
# loss is calculated using CrossEntropyLoss which averages over valid labels
118-
# N.B. the model only calculates loss over trg_len - 1 labels, because it internally shifts the labels
119-
# to the left by 1.
117+
# 손실은 모든 유효한 레이블에 대한 평균값을 구하는 교차 엔트로피(cross entropy)로 계산됩니다.
118+
# 나이브 베이지안 모델은 내부적으로 레이블을 왼쪽으로 1개씩 밀기 때문에, (타켓 - 1)개 만큼의 레이블에 대해 손실을 계산합니다.
120119
neg_log_likelihood = outputs.loss
121120

122121
nlls.append(neg_log_likelihood)

0 commit comments

Comments
 (0)