atsukoba / CNN-for-Sentence-Classification-in-Chainer

an unofficial implementation of "Convolutional Neural Networks for Sentence Classification" with Chainer. Hyperparameter Optimization with Optuna.
MIT License
3 stars 0 forks source link

`unsupported operand type(s) for +: 'int' and 'str'` on gensim.Word2Vec #1

Closed atsukoba closed 5 years ago

atsukoba commented 5 years ago
data = data_builder.load_imdb_data()
data.embed()

>>> TypeError: unsupported operand type(s) for +: 'int' and 'str'
atsukoba commented 5 years ago

unable to run Word2Vec training and get embedding weights for initializing weights of embed layers of CNN_static, CNN_non_static, CNN_multi_ch models.

atsukoba commented 5 years ago

this error occurs when using sentence matrix padded with "<PAD?>" as sentence parameter of Word2Vec model constructor.