Coder Social home page Coder Social logo

模型预测阶段内存占用 about clfzoo HOT 4 CLOSED

nutalk avatar nutalk commented on May 18, 2024
模型预测阶段内存占用

from clfzoo.

Comments (4)

SeanLee97 avatar SeanLee97 commented on May 18, 2024

@nutalk 请问你的机器配置是什么呢?
减少内存占用可适当降低 batch_size 和减少模型参数量

from clfzoo.

nutalk avatar nutalk commented on May 18, 2024

@nutalk 请问你的机器配置是什么呢?
减少内存占用可适当降低 batch_size 和减少模型参数量

训练模型是32g内存的机器,部署成接口的机器只有4G内存。
我看模型在预测阶段载入了训练数据,是不是这个过程比较占内存?

from clfzoo.

SeanLee97 avatar SeanLee97 commented on May 18, 2024

@nutalk infer 时可以把 config 里的 train_file 设为 None 应该就不会加载训练数据:https://github.com/SeanLee97/clfzoo/blob/master/clfzoo/dataloader.py#L39
但是词典肯定是要加载的,不过 4G 内存还是比较小

from clfzoo.

nutalk avatar nutalk commented on May 18, 2024

设置成None确实小了很多。谢谢。
ps:你的项目很好,节约了很多工程时间,非诚感谢。

from clfzoo.

Related Issues (1)

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.