Skip to content

Commit 1acd174

Browse files
committed
Fix typo
1 parent 424315c commit 1acd174

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/modeling/diffusion/gaussian_diffusion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def training_losses(self, model, x_start_never_used, t, model_kwargs=None, noise
274274
assert (
275275
model_output.shape == target.shape == x_start.shape
276276
), f"model_output.shape: {model_output.shape}, target.shape: {target.shape}, x_start.shape: {x_start.shape}"
277-
# the usual diffusion loss
277+
# the usual diffusion loss we use simple MSE (target minus output squared)
278278
terms["mse"] = mean_flat((target - model_output) ** 2)
279279
# print( terms["mse"])
280280
model_out_x_start = self.x0_helper(model_output, x_t, t)["pred_xstart"]

src/train_infer/train_loop.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def forward_backward(self, batch, cond):
255255
last_batch = (i + self.microbatch) >= batch_size
256256
curr_batch_size = micro_cond[list(micro_cond.keys())[0]].shape[0]
257257
t, weights = self.schedule_sampler.sample(curr_batch_size, dist_util.dev())
258-
# print(micro_cond.keys())
258+
print(f"Micro cond keys (in forward_backward): {micro_cond.keys()}")
259259
compute_losses = functools.partial(
260260
self.diffusion.training_losses,
261261
self.ddp_model, # this is the transformer model in DDP mode

src/utils/data_utils_sentencepiece.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def read_data(self):
5353

5454
def tokenization(example):
5555
return self.tokenizer(example["text"],
56-
max_lenght=512,
56+
max_length=512,
5757
padding=True,
5858
truncation=True)
5959

0 commit comments

Comments
 (0)