Git Product home page Git Product logo

finetune_bert's People

Contributors

xuxping avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

finetune_bert's Issues

AttributeError: module 'tensorflow.python.keras.backend' has no attribute 'get_graph'

测试时出现👇问题

Using TensorFlow backend.
Traceback (most recent call last):
  File "finetune_bert.py", line 14, in <module>
    from keras_bert import Tokenizer
  File "/home/xuxiaoping/anaconda3/envs/py35/lib/python3.5/site-packages/keras_bert/__init__.py", line 1, in <module>
    from .bert import *
  File "/home/xuxiaoping/anaconda3/envs/py35/lib/python3.5/site-packages/keras_bert/bert.py", line 2, in <module>
    from keras_pos_embd import PositionEmbedding
  File "/home/xuxiaoping/anaconda3/envs/py35/lib/python3.5/site-packages/keras_pos_embd/__init__.py", line 1, in <module>
    from .pos_embd import PositionEmbedding
  File "/home/xuxiaoping/anaconda3/envs/py35/lib/python3.5/site-packages/keras_pos_embd/pos_embd.py", line 1, in <module>
    from .backend import keras
  File "/home/xuxiaoping/anaconda3/envs/py35/lib/python3.5/site-packages/keras_pos_embd/backend.py", line 12, in <module>
    import keras
  File "/home/xuxiaoping/anaconda3/envs/py35/lib/python3.5/site-packages/keras/__init__.py", line 3, in <module>
    from . import utils
  File "/home/xuxiaoping/anaconda3/envs/py35/lib/python3.5/site-packages/keras/utils/__init__.py", line 6, in <module>
    from . import conv_utils
  File "/home/xuxiaoping/anaconda3/envs/py35/lib/python3.5/site-packages/keras/utils/conv_utils.py", line 9, in <module>
    from .. import backend as K
  File "/home/xuxiaoping/anaconda3/envs/py35/lib/python3.5/site-packages/keras/backend/__init__.py", line 1, in <module>
    from .load_backend import epsilon
  File "/home/xuxiaoping/anaconda3/envs/py35/lib/python3.5/site-packages/keras/backend/load_backend.py", line 90, in <module>
    from .tensorflow_backend import *
  File "/home/xuxiaoping/anaconda3/envs/py35/lib/python3.5/site-packages/keras/backend/tensorflow_backend.py", line 54, in <module>
    get_graph = tf_keras_backend.get_graph
AttributeError: module 'tensorflow.python.keras.backend' has no attribute 'get_graph'

token_ids编码异常

tokenzation_bert中的load_vocab加载词典后,出现id错位,导致编码异常
错误编码:
error

正确编码:
right

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.