python3安装intel的加速库:

conda config --add channels intel 
conda create --name intelpy intelpython3_full python=3  

然后在linux下:~/anaconda3/envs/intelpy/bin/conda install --name intelpy keras 是可以安装keras的,但是在我mac下会出错!蛋疼!!!

测试程序:

import numpy as np

import time

N = 102400

x = np.linspace(0.0123, 4567.89, N)

def mine(x,Z,func,name):

  print name;

  start = time.time()

  for z in range ( 0, Z ) :

    y = func(x);

  end = time.time()

  print N, Z, end - start

  return

mine(x,10000,np.sin,'np.sin')

mine(x,10000,np.cos,'np.cos')

mine(x,10000,np.tan,'np.tan')

https://www.leiphone.com/news/201704/8RWGJYDtZMCSrc8Q.html 在这里面看到提升的是20倍,但是在我的mac i5 cpu提升是8倍。

同时在我们自己的随机森林加速算法里,没有看到提升效果。这就很尴尬了。

补充,如何安装依赖库,使用intelpy里的conda即可:

/usr/local/anaconda3/envs/intelpy/bin/conda install --name intelpy --use-local *.bz2
/usr/local/anaconda3/envs/intelpy/bin/python ccdetect.py

相关文章:

  • 2021-04-17
  • 2021-07-24
  • 2021-12-31
  • 2021-10-06
  • 2021-09-30
  • 2021-12-03
  • 2021-12-10
  • 2021-10-31
猜你喜欢
  • 2022-12-23
  • 2021-08-04
  • 2021-09-24
  • 2021-12-19
  • 2022-12-23
  • 2021-08-18
相关资源
相似解决方案