{"action":"opened","issue":{"url":"https://api.github.com/repos/UKPLab/emnlp2017-bilstm-cnn-crf/issues/7","repository_url":"https://api.github.com/repos/UKPLab/emnlp2017-bilstm-cnn-crf","labels_url":"https://api.github.com/repos/UKPLab/emnlp2017-bilstm-cnn-crf/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/UKPLab/emnlp2017-bilstm-cnn-crf/issues/7/comments","events_url":"https://api.github.com/repos/UKPLab/emnlp2017-bilstm-cnn-crf/issues/7/events","html_url":"https://github.com/UKPLab/emnlp2017-bilstm-cnn-crf/issues/7","id":279374513,"number":7,"title":"Error when  I run the Train_NER_German.py","user":{"login":"1064950364","id":16190110,"avatar_url":"https://avatars0.githubusercontent.com/u/16190110?v=4","gravatar_id":"","url":"https://api.github.com/users/1064950364","html_url":"https://github.com/1064950364","followers_url":"https://api.github.com/users/1064950364/followers","following_url":"https://api.github.com/users/1064950364/following{/other_user}","gists_url":"https://api.github.com/users/1064950364/gists{/gist_id}","starred_url":"https://api.github.com/users/1064950364/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1064950364/subscriptions","organizations_url":"https://api.github.com/users/1064950364/orgs","repos_url":"https://api.github.com/users/1064950364/repos","events_url":"https://api.github.com/users/1064950364/events{/privacy}","received_events_url":"https://api.github.com/users/1064950364/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-05T13:27:27Z","updated_at":"2017-12-05T13:27:27Z","closed_at":null,"author_association":"NONE","body":"  Hi, @nreimers \r\nwhen  I run the Train_NER_German.py, I got the following error. Please have a look at the issue. Thanks.\r\n`Using Theano backend.\r\n\r\nUsing gpu device 1: GeForce GTX TITAN X (CNMeM is enabled with initial size: 40.0% of memory, cuDNN 6021)\r\nUsing existent pickle file: pkl/GermEval_2014_tudarmstadt_german_50mincount.vocab.pkl\r\nDataset: GermEval\r\n['NER_IOBES', 'NER_IOB', 'NER_BIO', 'tokens', 'casing', 'characters', 'NER_class']\r\nLabel key:  NER_BIO\r\nTrain Sentences: 24000\r\nDev Sentences: 2200\r\nTest Sentences: 5100\r\nBiLSTM model initialized with parameters: {'clipnorm': 1, 'optimizer': 'nadam', 'dropout': [0.25, 0.25], 'miniBatchSize': 32, 'earlyStopping': 5, 'addFeatureDimensions': 10, 'charFilterLength': 3, 'charLSTMSize': 25, 'charFilterSize': 30, 'classifier': 'CRF', 'clipvalue': 0, 'charEmbeddingsSize': 30, 'charEmbeddings': None, 'LSTM-Size': [100, 75]}\r\n24000 train sentences\r\n2200 dev sentences\r\n5100 test sentences\r\n--------- Epoch 1 -----------\r\nTraceback (most recent call last):\r\n  File \"Train_NER_German.py\", line 86, in <module>\r\n    model.evaluate(50)\r\n  File \"/home/xidb/Desktop/tf/emnlp2017-bilstm-cnn-crf/neuralnets/BiLSTM.py\", line 392, in evaluate\r\n    self.trainModel()\r\n  File \"/home/xidb/Desktop/tf/emnlp2017-bilstm-cnn-crf/neuralnets/BiLSTM.py\", line 93, in trainModel\r\n    self.buildModel()        \r\n  File \"/home/xidb/Desktop/tf/emnlp2017-bilstm-cnn-crf/neuralnets/BiLSTM.py\", line 247, in buildModel\r\n    tokens.add(Embedding(input_dim=embeddings.shape[0], output_dim=embeddings.shape[1],  weights=[embeddings], trainable=False, name='token_emd'))\r\n  File \"/home/xidb/anaconda2/lib/python2.7/site-packages/keras/models.py\", line 294, in add\r\n    layer.create_input_layer(batch_input_shape, input_dtype)\r\n  File \"/home/xidb/anaconda2/lib/python2.7/site-packages/keras/engine/topology.py\", line 398, in create_input_layer\r\n    self(x)\r\n  File \"/home/xidb/anaconda2/lib/python2.7/site-packages/keras/engine/topology.py\", line 543, in __call__\r\n    self.build(input_shapes[0])\r\n  File \"/home/xidb/anaconda2/lib/python2.7/site-packages/keras/layers/embeddings.py\", line 101, in build\r\n    self.set_weights(self.initial_weights)\r\n  File \"/home/xidb/anaconda2/lib/python2.7/site-packages/keras/engine/topology.py\", line 966, in set_weights\r\n    str(weights)[:50] + '...')\r\nValueError: You called `set_weights(weights)` on layer \"token_emd\" with a  weight list of length 1, but the layer was expecting 0 weights. Provided weights: [array([[ 0.        ,  0.        ,  0.        , .....\r\n\r\n`"}}
{"actor":{"display_login":"1064950364"}}