awd-lstm-lm
awd-lstm-lm copied to clipboard
Fine-tune broken for QRNNs?
I made some modifications to the codebase, so this might be a problem on my end... But does finetune.py
require SplitCrossEntropyLoss
to be used for the criterion instead? The decoder is called in SplitCrossEntropyLoss
only. I added the appropriate SplitCrossEntropyLoss
in finetune.py
, and it works as expected.
Finetune is currently broken - I forgot to update that code when updating main.py
.
See https://github.com/salesforce/awd-lstm-lm/issues/26
I'll close this when I've fixed the issue.
Hi @daemon, I'm trying to work this finetune.py out. Can you tell me what you changed to make this work? I imported SplitCrossEntropyLoss and changed criterion on https://github.com/salesforce/awd-lstm-lm/blob/master/finetune.py#L115 and https://github.com/salesforce/awd-lstm-lm/blob/master/finetune.py#L146 to SplitCrossEntropyLoss(...)
and changed the torch.load(f) on https://github.com/salesforce/awd-lstm-lm/blob/master/finetune.py#L177 to
model, _, _ = torch.load(f)
,
but this still gives me an error.
Any help would be greatly appreciated!
--------> found your github repo, https://github.com/daemon/awd-lstm-lm/commit/91b8271b368d4c5caa800c956b2817925e4f7b3d I think this will do!