You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got the following error when trying to train SERAC:
Traceback (most recent call last):
File "/EasyEdit/serac_train.py", line 16, in <module>
trainer.run()
File "/EasyEdit/easyeditor/trainer/BaseTrainer.py", line 195, in run
train_info = self.train_step(batch)
File "/EasyEdit/easyeditor/trainer/EditTrainer.py", line 141, in train_step
l_total, l_edit, l_loc, l_base, info_dict = self.edit_step(
File "/EasyEdit/easyeditor/trainer/EditTrainer.py", line 54, in edit_step
l_edit = self.model.edit_loss_fn(
File "/EasyEdit/easyeditor/trainer/algs/editable_model.py", line 24, in _edit_loss_fn
return masked_log_probs(config, pred, targ, shift=True, **kwargs)
File "/EasyEdit/easyeditor/trainer/losses.py", line 135, in masked_log_probs
return multiclass_log_probs(config, pred, targ, shift=shift, exact_match=exact_match, **kwargs)
File "/EasyEdit/easyeditor/trainer/losses.py", line 70, in multiclass_log_probs
unmasked_log_probs = pred.log_softmax(-1).gather(-1, targ.unsqueeze(-1)).squeeze(-1)
RuntimeError: Size does not match at dimension 1 expected index [10, 32, 1] to be smaller than self [10, 31, 32000] apart from dimension 2
I have run the training successfully on a different dataset that had shorter strings for the new target. Is there a limit to how long the new target should be? If so, do you have suggestions on how to handle this? For example, would it be okay to provide a simplified version of the edits that are within the limit for training but provide the full string for edits?
The text was updated successfully, but these errors were encountered:
I got the following error when trying to train SERAC:
I have run the training successfully on a different dataset that had shorter strings for the new target. Is there a limit to how long the new target should be? If so, do you have suggestions on how to handle this? For example, would it be okay to provide a simplified version of the edits that are within the limit for training but provide the full string for edits?
The text was updated successfully, but these errors were encountered: