theano

Building Speech Dataset for LSTM binary classification

自闭症网瘾萝莉.ら 提交于 2019-12-17 14:48:50
问题 I'm trying to do binary LSTM classification using theano. I have gone through the example code however I want to build my own. I have a small set of "Hello" & "Goodbye" recordings that I am using. I preprocess these by extracting the MFCC features for them and saving these features in a text file. I have 20 speech files(10 each) and I am generating a text file for each word, so 20 text files that contains the MFCC features. Each file is a 13x56 matrix. My problem now is: How do I use this

Installing theano on Windows 8 with GPU enabled

亡梦爱人 提交于 2019-12-17 10:24:12
问题 I understand that the Theano support for Windows 8.1 is at experimental stage only but I wonder if anyone had any luck with resolving my issues. Depending on my config, I get three distinct types of errors. I assume that the resolution of any of my errors would solve my problem. I have installed Python using WinPython 32-bit system, using MinGW as described here. The contents of my .theanorc file are as follows: [global] openmp=False device = gpu [nvcc] flags=-LC:\TheanoPython\python-2.7.6

Keras import error Nadam

喜你入骨 提交于 2019-12-17 09:59:33
问题 I am getting an import error when trying to import the Keras module Nadam: >>> from keras.optimizers import Nadam Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: cannot import name Nadam I can import and use SGD, Adam, etc, just not this optimizer. Any help appreciated. I installed Keras using: git clone https://github.com/fchollet/keras.git sudo python2.7 setup.py install I have just found that, if I try to import it using the shell immediately after

how to setup cuDnn with theano on Windows 7 64 bit

佐手、 提交于 2019-12-17 04:33:42
问题 I have installed Theano framework and enabled CUDA on my machine, however when I "import theano" in my python console, I got the following message: >>> import theano Using gpu device 0: GeForce GTX 950 (CNMeM is disabled, CuDNN not available) Now that "CuDNN not available", I downloaded cuDnn from Nvidia website. I also updated 'path' in environment, and added 'optimizer_including=cudnn' in '.theanorc.txt' config file. Then, I tried again, but failed, with: >>> import theano Using gpu device

how to setup cuDnn with theano on Windows 7 64 bit

可紊 提交于 2019-12-17 04:33:14
问题 I have installed Theano framework and enabled CUDA on my machine, however when I "import theano" in my python console, I got the following message: >>> import theano Using gpu device 0: GeForce GTX 950 (CNMeM is disabled, CuDNN not available) Now that "CuDNN not available", I downloaded cuDnn from Nvidia website. I also updated 'path' in environment, and added 'optimizer_including=cudnn' in '.theanorc.txt' config file. Then, I tried again, but failed, with: >>> import theano Using gpu device

Getting gradient of model output w.r.t weights using Keras

☆樱花仙子☆ 提交于 2019-12-17 04:25:13
问题 I am interested in building reinforcement learning models with the simplicity of the Keras API. Unfortunately, I am unable to extract the gradient of the output (not error) with respect to the weights. I found the following code that performs a similar function (Saliency maps of neural networks (using Keras)) get_output = theano.function([model.layers[0].input],model.layers[-1].output,allow_input_downcast=True) fx = theano.function([model.layers[0].input] ,T.jacobian(model.layers[-1].output

How do I install Keras and Theano in Anaconda Python on Windows?

谁说胖子不能爱 提交于 2019-12-17 04:10:36
问题 I am trying to work on neural networks in Python using the following Keras packages: from keras.utils import np_utils from keras.layers.core import Dense, Activation, Dropout from keras.models import Sequential from keras.layers.core import Dense, Dropout, Activation, Flatten from keras.layers.convolutional import Convolution2D, MaxPooling2D from keras.optimizers import SGD But, I am getting the following error: 15 import theano ---> 16 from theano import gof 17 from theano.compat.python2x

Theano / Keras: Set the K-first values of Tensor to a value

断了今生、忘了曾经 提交于 2019-12-13 17:16:42
问题 I have a custom Keras layer and i use Theano as the backend and i want to do the following operation: Suppose we have a tensor with shape (N,). I want to set the K first values to a fixed value x (3 or whatever...). How do i do that? I assume i have to use argsort but i don't know how to implement it using Theano. For example in a simple FF layer, how can i set the first N values of the tensor a to a value x ? def call(self, x, mask=None): a = K.dot(x, self.W) if self.bias: a += self.b return

pymc3 likelihood math with non-theano function

天涯浪子 提交于 2019-12-13 16:25:19
问题 I'm new to doing Bayesian inference. I'm trying to adapt a grid search code I wrote to Bayesian Monte Carlo Markov Chain approach, and I'm using PyMC3. My problem is that the code has to call a function that can't be rewritten in theano syntax. (The function relies on a piece of Fortran code in an f2py wrapper.) Here's the code I'm working with: with pm.Model() as model: # Independent parameters x = pm.Normal('x', sx, sd=incx*float(nrangex)/2.0) y = pm.Normal('y', sy, sd=incy*float(nrangey)/2

Input dimension mismatch binary crossentropy Lasagne and Theano

放肆的年华 提交于 2019-12-13 13:23:19
问题 I read all posts in the net adressing the issue where people forgot to change the target vector to a matrix, and as a problem remains after this change, I decided to ask my question here. Workarounds are mentioned below, but new problems show and I am thankful for suggestions! Using a convolution network setup and binary crossentropy with sigmoid activation function, I get a dimension mismatch problem, but not during the training data, only during validation / test data evaluation. For some