awd-lstm-lm icon indicating copy to clipboard operation
awd-lstm-lm copied to clipboard

Fine-tune broken for QRNNs?

Open daemon opened this issue 6 years ago • 2 comments

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.

daemon avatar Mar 26 '18 16:03 daemon

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.

Smerity avatar Apr 03 '18 21:04 Smerity

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!

soyoung97 avatar Dec 06 '19 17:12 soyoung97