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

Internal assert error in awd_qrnn #2967

Closed
sky1ove opened this issue Nov 10, 2020 · 2 comments
Closed

Internal assert error in awd_qrnn #2967

sky1ove opened this issue Nov 10, 2020 · 2 comments
Labels

Comments

@sky1ove
Copy link

sky1ove commented Nov 10, 2020

To reproduce the error:https://colab.research.google.com/drive/19WzwYTzs78DNvQ7VTw_37hbXq3l5ozsk?usp=sharing

My input is 872 embeddings (from integer 0 to 872), output is n=206 classifications. AWD_LSTM works fine. However, when I changed to AWD_QRNN, it shows the bug below.

config = awd_qrnn_clas_config.copy()
config.update({'bidir':True})

model =get_text_classifier(AWD_QRNN, 872, 206, seq_len=872, config=config)
print(model)
SequentialRNN(
(0): SentenceEncoder(
(module): AWD_QRNN(
(encoder): Embedding(872, 400, padding_idx=1)
(encoder_dp): EmbeddingDropout(
(emb): Embedding(872, 400, padding_idx=1)
)
(rnns): ModuleList(
(0): QRNN(
(layers): ModuleList(
(0): QRNNLayer(
(linear): WeightDropout(
(module): Linear(in_features=800, out_features=2328, bias=True)
)
)
)
(layers_bwd): ModuleList(
(0): QRNNLayer(
(linear): Linear(in_features=800, out_features=2328, bias=True)
)
)
)
(1): QRNN(
(layers): ModuleList(
(0): QRNNLayer(
(linear): WeightDropout(
(module): Linear(in_features=1552, out_features=2328, bias=True)
)
)
)
(layers_bwd): ModuleList(
(0): QRNNLayer(
(linear): Linear(in_features=1552, out_features=2328, bias=True)
)
)
)
(2): QRNN(
(layers): ModuleList(
(0): QRNNLayer(
(linear): WeightDropout(
(module): Linear(in_features=1552, out_features=2328, bias=True)
)
)
)
(layers_bwd): ModuleList(
(0): QRNNLayer(
(linear): Linear(in_features=1552, out_features=2328, bias=True)
)
)
)
(3): QRNN(
(layers): ModuleList(
(0): QRNNLayer(
(linear): WeightDropout(
(module): Linear(in_features=1552, out_features=600, bias=True)
)
)
)
(layers_bwd): ModuleList(
(0): QRNNLayer(
(linear): Linear(in_features=1552, out_features=600, bias=True)
)
)
)
)
(input_dp): RNNDropout()
(hidden_dps): ModuleList(
(0): RNNDropout()
(1): RNNDropout()
(2): RNNDropout()
(3): RNNDropout()
)
)
)
(1): PoolingLinearClassifier(
(layers): Sequential(
(0): LinBnDrop(
(0): BatchNorm1d(1200, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(1): Dropout(p=0.4, inplace=False)
(2): Linear(in_features=1200, out_features=50, bias=False)
(3): ReLU(inplace=True)
)
(1): LinBnDrop(
(0): BatchNorm1d(50, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(1): Dropout(p=0.1, inplace=False)
(2): Linear(in_features=50, out_features=206, bias=False)
)
)
)
)

x, y = dls.one_batch()
model(x)
image

Everything works well with AWD_LSTM, but not with AWD_QRNN. Please fix it. Thanks.

@jph00
Copy link
Member

jph00 commented Nov 11, 2020

Please provide a complete reproducer. A colab link would be most helpful. The reproducer needs to use a publicly available dataset - preferably a small one that's provided in fastai's URLs class.

@sky1ove
Copy link
Author

sky1ove commented Nov 11, 2020

Please provide a complete reproducer. A colab link would be most helpful. The reproducer needs to use a publicly available dataset - preferably a small one that's provided in fastai's URLs class.

https://colab.research.google.com/drive/19WzwYTzs78DNvQ7VTw_37hbXq3l5ozsk?usp=sharing
Please check this colab

@jph00 jph00 changed the title awd_qrnn does not work Internal assert error in awd_qrnn Nov 23, 2020
@jph00 jph00 added the bug label Nov 23, 2020
@jph00 jph00 closed this as completed in 5b6148e Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants