make destructuring datum length agnostic when validating in training decoder script, for @YUHANG-Ma

This commit is contained in:
Phil Wang
2022-06-02 13:54:57 -07:00
parent 9025345e29
commit f8bfd3493a

View File

@@ -331,7 +331,7 @@ def train(
sample = 0 sample = 0
average_loss = 0 average_loss = 0
timer = Timer() timer = Timer()
for i, (img, emb, txt) in enumerate(dataloaders["val"]): for i, (img, emb, *_) in enumerate(dataloaders["val"]):
sample += img.shape[0] sample += img.shape[0]
img, emb = send_to_device((img, emb)) img, emb = send_to_device((img, emb))