Giter Site home page Giter Site logo

Comments (5)

ProHiryu avatar ProHiryu commented on July 2, 2024 2

see #22134

Try:

  1. reduce the batch_size
  2. reduce some convs outputs to reduce the params.

from bert-chinese-ner.

lizhzh8 avatar lizhzh8 commented on July 2, 2024

本来我的tensorflow是1.8.0的,发现和那个bert的源码不兼容

后来我升级到1.9.0了,可是还是报错了。更新为1.9.0报错信息如下,跪求解决方案

2019-03-12 22:29:47.417690: E T:\src\github\tensorflow\tensorflow\core\common_runtime\executor.cc:696] Executor failed to create kernel. Not found: No registered '_CopyFromGpuToHost' OpKernel for CPU devices compatible with node swap_out_gradients/bert/encoder/layer_0/attention/self/key/MatMul_grad/MatMul_1_0 = _CopyFromGpuToHostT=DT_FLOAT, _class=["loc@gradients/bert/encoder/layer_0/attention/self/key/MatMul_grad/MatMul_1_0"], _device="/job:localhost/replica:0/task:0/device:CPU:0"
. Registered: device='GPU'

 [[Node: swap_out_gradients/bert/encoder/layer_0/attention/self/key/MatMul_grad/MatMul_1_0 = _CopyFromGpuToHost[T=DT_FLOAT, _class=["loc@gradients/bert/encoder/layer_0/attention/self/key/MatMul_grad/MatMul_1_0"], _device="/job:localhost/replica:0/task:0/device:CPU:0"](bert/encoder/Reshape_1/_4857)]]

Traceback (most recent call last):

你最终用的TensorFlow版本是什么?谢谢了

from bert-chinese-ner.

fatYangmomo avatar fatYangmomo commented on July 2, 2024

我遇到了同样的问题,应该不是tensorflow版本的问题。我把seq length 和 max batch size分别从128和32改到了64和4才跑起来……机子cpu2.8GHZ,内存是8G,1050Ti。和google给的Titan X GPU(12GB RAM)的seq length 和 max batch size的128和32差的还是蛮多,主要是cpu爆了。

from bert-chinese-ner.

lizhzh8 avatar lizhzh8 commented on July 2, 2024

我遇到了同样的问题,应该不是tensorflow版本的问题。我把seq length 和 max batch size分别从128和32改到了64和4才跑起来……机子cpu2.8GHZ,内存是8G,1050Ti。和google给的Titan X GPU(12GB RAM)的seq length 和 max batch size的128和32差的还是蛮多,主要是cpu爆了。

这两个参数在哪个文件?没看到呢

from bert-chinese-ner.

wshzd avatar wshzd commented on July 2, 2024

flags.DEFINE_integer(
"max_seq_length", 128,
"The maximum total input sequence length after WordPiece tokenization."
)

from bert-chinese-ner.

Related Issues (20)

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.