Git Product home page Git Product logo

Comments (6)

guofei9987 avatar guofei9987 commented on July 17, 2024

事实上是支持矢量化运算的:

  • 大多数默认算子直接支持矢量化运算
  • 适应度计算支持矢量化计算,但默认设定为否,这是考虑到新手用户会编程中出错。参看文档
  • 经过实验,多线程的实际速度远不如矢量化运算,因此做了删除处理。这是因为,作为纯 Python实现,多线程优化途径很受限。相比之下,矢量化运算充分利用了 numpy 的矢量化计算能力。
  • 另外,还实现了利用 Pytorch 的 GPU 计算能力的代码,参见 文档。但实验发现,只有计算量极大的时候,才比矢量化计算快。

from scikit-opt.

bnpzsx avatar bnpzsx commented on July 17, 2024

非常感谢,开启矢量化计算后,在适应度函数里加上多线程就就很快了

from scikit-opt.

MaCshan avatar MaCshan commented on July 17, 2024

适应度函数本身不支持全部矢量化计算,可以使用numba对局部numpy计算加速。怎样开启多线程加速呢

from scikit-opt.

bnpzsx avatar bnpzsx commented on July 17, 2024

这里我使用的进程池,每次计算适应度就分配一个任务

from scikit-opt.

wanqguan avatar wanqguan commented on July 17, 2024

这里我使用的进程池,每次计算适应度就分配一个任务

具体怎么做呢?是否能直接给个代码示例?

from scikit-opt.

guofei9987 avatar guofei9987 commented on July 17, 2024

0.6.2 版本已经支持以下加速:

  • 并行化计算
  • 矢量化计算
  • 缓存化计算

中文文档: https://scikit-opt.github.io/scikit-opt/#/zh/speed_up
英文文档:https://scikit-opt.github.io/scikit-opt/#/en/speed_up

如有建议,欢迎重新 open issue~

from scikit-opt.

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.