Comments (6)
事实上是支持矢量化运算的:
- 大多数默认算子直接支持矢量化运算
- 适应度计算支持矢量化计算,但默认设定为否,这是考虑到新手用户会编程中出错。参看文档
- 经过实验,多线程的实际速度远不如矢量化运算,因此做了删除处理。这是因为,作为纯 Python实现,多线程优化途径很受限。相比之下,矢量化运算充分利用了 numpy 的矢量化计算能力。
- 另外,还实现了利用 Pytorch 的 GPU 计算能力的代码,参见 文档。但实验发现,只有计算量极大的时候,才比矢量化计算快。
from scikit-opt.
非常感谢,开启矢量化计算后,在适应度函数里加上多线程就就很快了
from scikit-opt.
适应度函数本身不支持全部矢量化计算,可以使用numba对局部numpy计算加速。怎样开启多线程加速呢
from scikit-opt.
这里我使用的进程池,每次计算适应度就分配一个任务
from scikit-opt.
这里我使用的进程池,每次计算适应度就分配一个任务
具体怎么做呢?是否能直接给个代码示例?
from scikit-opt.
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)
- crossover.py文件中crossover_2point_bit算子起作用吗
- How to change crossover rate? HOT 1
- 请问GA在做整数规划的时候怎么设置才能保证每次n个变量间不重复 HOT 1
- Allow users to set number of process pool workers/threads
- 如何在初始化阶段将表现良好的个体加入种群?
- 规定GA起始点
- 约束条件不生效
- 请教多进程模式下,如何释放占用内存 HOT 3
- ACA算法发生除0问题
- 请问模拟退火算法出自于哪里?
- 希望增加进度条
- 如何设置遗传算法优化函数最大化?提供的一些demo都是目标函数最小化问题求解
- 请问,如何解决一个简单的VRP问题?
- 如何用已知的较好参数初始化种群 HOT 2
- 默认优化目标最大还是最小
- solve the problem that use grid route
- 计算加速
- 非优化参数的传入 HOT 2
- BUG: array shape mismatch between Y and pbest_y in PSO, error raised in update_pbest HOT 1
- 请问约束等式或约束不等式支持向量化形式的约束吗?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scikit-opt.