Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Kim CNN ONNX-exportable #136

Merged
merged 3 commits into from Aug 4, 2018

Conversation

Projects
None yet
3 participants
@tuzhucheng
Copy link
Member

commented Aug 3, 2018

Can now export Kim CNN ONNX model from the command line:

python -m kim_cnn --dataset SST-1 --mode static --onnx

@tuzhucheng tuzhucheng requested a review from Victor0118 Aug 3, 2018

@Victor0118
Copy link
Member

left a comment

LGTM!

@@ -143,3 +144,8 @@ def evaluate_dataset(split_name, dataset_cls, model, embedding, loader, batch_si
else:
raise ValueError('Unrecognized dataset')

if args.onnx:
dummy_input = next(iter(dev_iter)).text

This comment has been minimized.

Copy link
@Impavidity

Impavidity Aug 4, 2018

Member

Could we somehow define the dummy_input shape through the argument parser ? Because we could not control the shape (batch length, sentence length) through dev_iter

@Impavidity
Copy link
Member

left a comment

LGTM!

@tuzhucheng tuzhucheng merged commit 8a00f9c into castorini:master Aug 4, 2018

@tuzhucheng tuzhucheng deleted the tuzhucheng:kim-cnn-onnx-export branch Aug 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.