uhh-lt / BlurbGenreCollection-HMC

Hierarchical multi-label text classification of the BlurbGenreCollection using capsule networks.
https://www.aclweb.org/anthology/P19-2045/
Apache License 2.0
83 stars 10 forks source link

Add compatibility to TensorFlow versions >=1.13.1 #5

Closed proszx closed 5 years ago

proszx commented 5 years ago

when i run the code as your tuturial. i has some problem.can you show me your tensorflow verson of the project

WARNING:
Traceback (most recent call last):
  File "main.py", line 400, in <module>
    main()
  File "main.py", line 299, in main
    run()
  File "main.py", line 321, in run
    model = create_model(dev = True, preload = False)
  File "main.py", line 371, in create_model
    return model_capsule(dev, preload)
  File "main.py", line 258, in model_capsule
    args.dense_capsule_dim, args.n_channels, 3, dev)
  File "/code/BlurbGenreCollection_Classification/code/networks.py", line 37, in create_model_capsule
    input = inputs, use_static = use_static, voc = vocabulary, lang = language, dev = dev)
  File "/code/BlurbGenreCollection_Classification/code/networks.py", line 238, in pre_embedding
    trainable= trainable)(input)
  File "/home/prozx/anaconda3/lib/python3.6/site-packages/keras/engine/base_layer.py", line 430, in __call__
    self.set_weights(self._initial_weights)
  File "/home/prozx/anaconda3/lib/python3.6/site-packages/keras/engine/base_layer.py", line 1051, in set_weights
    'provided weight shape ' + str(w.shape))
ValueError: Layer weight shape (45, 300) not compatible with provided weight shape (100288, 300)
Raldir commented 5 years ago

The requirements.txt has been updated. Unfortunately, the implementation does not yet support a tensorflow version required for CUDA 10 and NVIDIA 20X0 cards. This will be de addressed as soon as possible.