Coder Social home page Coder Social logo

parallel_apply多线程出错 about bert4keras HOT 6 CLOSED

bojone avatar bojone commented on June 2, 2024
parallel_apply多线程出错

from bert4keras.

Comments (6)

bojone avatar bojone commented on June 2, 2024

就是这种写法不支持windows的意思~~

from bert4keras.

nihuizhidao avatar nihuizhidao commented on June 2, 2024

就是这种写法不支持windows的意思~~

秒回啊。。。

好吧,那不用windows了。。。对了,我还有个问题,seq2seq时,用tfrecord,指定了fixed length的类型后,是不是不需要再用sequence__padding了?因为 FixedLenFeature = tf.io.FixedLenFeature([sequence_length], tf.int64) 已经指定了sequence_length

from bert4keras.

bojone avatar bojone commented on June 2, 2024

1、parallel_apply那里,如果非得用windows的话,可以考虑在parallel_apply中传入参数dummy=True,这样应该能跑,但是会慢一些;

2、你就算用FixedLenFeature,好像也得自己把单个样本向量padding好吧?(我对tfrecord其实不熟悉)。

from bert4keras.

nihuizhidao avatar nihuizhidao commented on June 2, 2024

1、好吧,那不纠结parallel_apply了

2、对单个样本向量padding的话会不会对准确率有影响啊,因为之前没用tfrecord的时候,我们用的是sequence_padding,是取一个batch里最大的长度padding。。。

from bert4keras.

bojone avatar bojone commented on June 2, 2024

padding多少个0都不会有影响的呀,模型会自动排除padding部分的影响,最终等价于没有padding。

from bert4keras.

nihuizhidao avatar nihuizhidao commented on June 2, 2024

哦哦,这样啊,谢谢大佬~

from bert4keras.

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.