intel-mkl

Receive AssertionError while optimizing convolution in theano

[亡魂溺海] 提交于 2019-12-02 06:53:13
I am trying to run this code: x_set = np.random.rand(100,100,100) x = T.dtensor3('x') inp = x.reshape((100, 1, 100, 100)) W_stdDev = np.sqrt(2. / (3 * 3 * 2)) W = theano.shared( np.asarray( np.random.normal(loc=.0, scale=W_stdDev, size=(3,1,3,3)), dtype=theano.config.floatX ), borrow=True ) conv_out = conv2d( input=inp, filters=W, filter_shape=(3,1,3,3), ) train_model = theano.function( inputs=[x], outputs=conv_out, ) print(train_model(x_set)) but receive the error: AssertionError: AbstractConv2d Theano optimization failed: there is no implementation available supporting the requested options.

Anaconda: cannot find packages when calling Python interpreter from outside the shell

 ̄綄美尐妖づ 提交于 2019-12-02 03:56:24
I have two Anaconda environments: The base environment An R environment (containing R only) The base environment is the default environment and does not appear in the Anaconda subdirectory envs . Base is activated by default and in particular while the commands below are executed. When I run python from within the Anaconda prompt (or another prompt that I have configured for Anaconda), importing numpy works without problems. However, when I run my scrips from my IDE (exctuing C:\my\path\to\Anaconda3\python.exe myscript.py ), the import of numpy fails. Therefore, I have installed numpy through

how to create an environment in anaconda with numpy nomkl?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 03:40:39
I wrote a script using andaconda2 python2.7, and wxpython, matplotlib, skimage, numpy. After using pyinstaller to generate an executable files. the total size is almost 700 mb. it feels too large. Someone said because numpy uses MKL which is very large ~ 400 mb as I saw in folder. so I wonder how to create an environment using numpy nomkl? Or if anyone has experience to reduce the size of executable files using pyinstaller, please let me know. BTW, I tried py2exe. it creates a much smaller folder, but somehow the exe doesn't work. Thanks! I think the canonical way would be: conda create -n new

Fix arithmetic error in distributed version

懵懂的女人 提交于 2019-12-02 02:21:06
I am inverting a matrix via a Cholesky factorization, in a distributed environment, as it was discussed here . My code works fine, but in order to test that my distributed project produces correct results, I had to compare it with the serial version. The results are not exactly the same! For example, the last five cells of the result matrix are: serial gives: -250207683.634793 -1353198687.861288 2816966067.598196 -144344843844.616425 323890119928.788757 distributed gives: -250207683.634692 -1353198687.861386 2816966067.598891 -144344843844.617096 323890119928.788757 I had post in the Intel

Unexpected result with cblas_dgemv

半腔热情 提交于 2019-12-01 21:02:04
问题 I have a question regarding cblas_dgemv. I am trying to understand how it works. And what I am possibly doing wrong. I have an array Matrix and then I try to read that matrix RowMajor and ColumnMajor. I am getting the expected result in the RowMajor Case; [6, 2, 4, 6]'. However for the ColMajor, I am getting [-7, 3, 0, 5]' when the answer should be [6, 3, 2, 3]' Here is my code. I am using Intel MKL. #include <stdio.h> #include <stdlib.h> #include <math.h> #include <mkl.h> #define NCols 5

Unexpected result with cblas_dgemv

时光毁灭记忆、已成空白 提交于 2019-12-01 18:42:32
I have a question regarding cblas_dgemv. I am trying to understand how it works. And what I am possibly doing wrong. I have an array Matrix and then I try to read that matrix RowMajor and ColumnMajor. I am getting the expected result in the RowMajor Case; [6, 2, 4, 6]'. However for the ColMajor, I am getting [-7, 3, 0, 5]' when the answer should be [6, 3, 2, 3]' Here is my code. I am using Intel MKL. #include <stdio.h> #include <stdlib.h> #include <math.h> #include <mkl.h> #define NCols 5 #define Nrows 4 double A[] = { 8, 4, 7, 3, 5, 1, 1, 3, 2, 1, 2, 3, 2, 0, 1, 1 , 2, 3, 4, 1}; double x[] =

Rewriting Matlab eig(A,B) (Generalized eigenvalues/eigenvectors) to C/C++

情到浓时终转凉″ 提交于 2019-12-01 09:12:41
Do anyone have any idea how can I rewrite eig(A,B) from Matlab used to calculate generalized eigenvector/eigenvalues? I've been struggling with this problem lately. So far: Matlab definition of eig function I need: [V,D] = eig(A,B) produces a diagonal matrix D of generalized eigenvalues and a full matrix V whose columns are the corresponding eigenvectors so that A*V = B*V*D. So far I tried the Eigen library ( http://eigen.tuxfamily.org/dox/classEigen_1_1GeneralizedSelfAdjointEigenSolver.html ) My implementation looks like this: std::pair<Matrix4cd, Vector4d> eig(const Matrix4cd& A, const

Numpy / Polyfit - Suppress printing of Intel MKL Error message

本秂侑毒 提交于 2019-12-01 08:36:18
I'm computing a polyfit multiple times during a program, and some of my inputs are np.nan and are going to get the algorithm problems. I know this, and in this application I don't care. When things mess up, this is printed to the console: Intel MKL ERROR: Parameter 4 was incorrect on entry to DELSD. I simply want to suppress this error. I've already tried: import warnings warnings.simplefilter('ignore', np.RankWarning) warnings.simplefilter('ignore', np.ComplexWarning) warnings.filterwarnings('ignore', "Intel MKL ERROR") Which suppresses some warnings, but not the Intel MKL one. I simply want

Numpy / Polyfit - Suppress printing of Intel MKL Error message

僤鯓⒐⒋嵵緔 提交于 2019-12-01 07:21:31
问题 I'm computing a polyfit multiple times during a program, and some of my inputs are np.nan and are going to get the algorithm problems. I know this, and in this application I don't care. When things mess up, this is printed to the console: Intel MKL ERROR: Parameter 4 was incorrect on entry to DELSD. I simply want to suppress this error. I've already tried: import warnings warnings.simplefilter('ignore', np.RankWarning) warnings.simplefilter('ignore', np.ComplexWarning) warnings.filterwarnings

Install Scipy with MKL through PIP

心已入冬 提交于 2019-11-30 11:00:33
I am using PIP to install Scipy with MKL to accelerate the performance. My OS is Ubuntu 64 bit. Using the solution from this question , I create a file .numpy-site.cfg [mkl] library_dirs=/opt/intel/composer_xe_2013_sp1/mkl/lib/intel64/ include_dirs=/opt/intel/mkl/include/ mkl_libs=mkl_intel_lp64,mkl_intel_thread,mkl_core,mkl_rt lapack_libs= This file helps me to install Numpy with MKL successfully. However, using the same above file, installing Scipy prompts the error ImportError: libmkl_rt.so: cannot open shared object file: No such file or directory I also use export LD_LIBRARY_PATH=/opt