Coder Social home page Coder Social logo

core_nlp's Issues

ERROR: module 'keras.backend' has no attribute 'unique_object_name'

❯ python demo.py
2021-06-02 20:59:41.558455: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2021-06-02 20:59:41.558484: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Using TensorFlow backend.
Loading model from file models/pretrained_tokenizer.crfsuite
Traceback (most recent call last):
File "demo.py", line 25, in
keras_text_classifier.train(X, y)
File "/home/ml/DESKT_MAC/Text_Classi/core_nlp/text_classification/short_text_classifiers.py", line 76, in train
self.model = self.build_model(input_dim=(X.shape[1], X.shape[2]))
File "/home/ml/DESKT_MAC/Text_Classi/core_nlp/text_classification/short_text_classifiers.py", line 225, in build_model
model = Sequential()
File "/home/ml/DESKT_MAC/Text_Classi/core_nlp/venv/lib/python3.6/site-packages/tensorflow/python/training/tracking/base.py", line 522, in _method_wrapper
result = method(self, *args, **kwargs)
File "/home/ml/DESKT_MAC/Text_Classi/core_nlp/venv/lib/python3.6/site-packages/keras/engine/sequential.py", line 110, in init
name=name, autocast=False)
File "/home/ml/DESKT_MAC/Text_Classi/core_nlp/venv/lib/python3.6/site-packages/tensorflow/python/training/tracking/base.py", line 522, in _method_wrapper
result = method(self, *args, **kwargs)
File "/home/ml/DESKT_MAC/Text_Classi/core_nlp/venv/lib/python3.6/site-packages/keras/engine/training.py", line 245, in init
super(Model, self).init(**kwargs)
File "/home/ml/DESKT_MAC/Text_Classi/core_nlp/venv/lib/python3.6/site-packages/tensorflow/python/training/tracking/base.py", line 522, in _method_wrapper
result = method(self, *args, **kwargs)
File "/home/ml/DESKT_MAC/Text_Classi/core_nlp/venv/lib/python3.6/site-packages/keras/engine/base_layer.py", line 350, in init
self._init_set_name(name)
File "/home/ml/DESKT_MAC/Text_Classi/core_nlp/venv/lib/python3.6/site-packages/keras/engine/functional.py", line 501, in _init_set_name
self._name = backend.unique_object_name(
AttributeError: module 'keras.backend' has no attribute 'unique_object_name'

=> Khi cài những lib trong requirement.txt, còn y/c cài thêm Tensorflow, xong rồi em chạy file demo.py của anh nó ra lỗi vậy. Help em với anh !

Lỗi ValueError: malformed string

Em chạy thì nó bị lỗi này mà ko biết sửa thế nào cả

Using TensorFlow backend.
Traceback (most recent call last):
File "demo.py", line 11, in
model_path='models/pretrained_tokenizer.crfsuite')
File "/home/voccer/Desktop/text_classification/core_nlp/tokenization/crf_tokenizer.py", line 98, in init
self.bi_grams = load_n_grams(config_root_path + bi_grams_path)
File "/home/voccer/Desktop/text_classification/core_nlp/tokenization/utils.py", line 10, in load_n_grams
words = ast.literal_eval(words)
File "/usr/lib/python2.7/ast.py", line 80, in literal_eval
return _convert(node_or_string)
File "/usr/lib/python2.7/ast.py", line 79, in _convert
raise ValueError('malformed string')
ValueError: malformed string
voccer@voccer:~/Desktop/text_classification/core_nlp$ python demo.py
Using TensorFlow backend.
Traceback (most recent call last):
File "demo.py", line 11, in
model_path='models/pretrained_tokenizer.crfsuite')
File "/home/voccer/Desktop/text_classification/core_nlp/tokenization/crf_tokenizer.py", line 98, in init
self.bi_grams = load_n_grams(config_root_path + bi_grams_path)
File "/home/voccer/Desktop/text_classification/core_nlp/tokenization/utils.py", line 10, in load_n_grams
words = ast.literal_eval(words)
File "/usr/lib/python2.7/ast.py", line 80, in literal_eval
return _convert(node_or_string)
File "/usr/lib/python2.7/ast.py", line 79, in _convert
raise ValueError('malformed string')
ValueError: malformed string

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.