pytorch / translate

Translate - a PyTorch Language Library
BSD 3-Clause "New" or "Revised" License
826 stars 192 forks source link

Fix export code after model "hard fork" #667

Closed cndn closed 4 years ago

cndn commented 4 years ago

Summary: After internal version is introduced and transformer uses namedtuple instead of dict, need to update the export code accordingly.

Also we used torch.empty([0]) to represent initial attention instead of None, to unify the data type in TorchScript.

Differential Revision: D18648224

facebook-github-bot commented 4 years ago

This pull request was exported from Phabricator. Differential Revision: D18648224

facebook-github-bot commented 4 years ago

This pull request was exported from Phabricator. Differential Revision: D18648224

facebook-github-bot commented 4 years ago

This pull request was exported from Phabricator. Differential Revision: D18648224