theano

Deep-Learning Nan loss reasons

本秂侑毒 提交于 2019-11-27 17:15:12
Perhaps too general a question, but can anyone explain what would cause a Convolutional Neural Network to diverge? Specifics: I am using Tensorflow's iris_training model with some of my own data and keep getting ERROR:tensorflow:Model diverged with loss = NaN. Traceback... tensorflow.contrib.learn.python.learn.monitors.NanLossDuringTrainingError: NaN loss during training. Traceback originated with line: tf.contrib.learn.DNNClassifier(feature_columns=feature_columns, hidden_units=[300, 300, 300], #optimizer=tf.train.ProximalAdagradOptimizer(learning_rate=0.001, l1_regularization_strength=0

Building Speech Dataset for LSTM binary classification

血红的双手。 提交于 2019-11-27 16:09:35
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 text file to train the LSTM? I am relatively new to this. I have gone through some literature on it as

How to change Keras backend (where's the json file)?

女生的网名这么多〃 提交于 2019-11-27 15:43:35
问题 I have installed Keras, and wanted to switch the backend to Theano. I checked out this post, but still have no idea where to put the created json file. Also, below is the error I got when running import keras in Python Shell: Using TensorFlow backend. Traceback (most recent call last): File "", line 1, in import keras File "C:\Python27\lib\site-packages\keras__init__.py", line 2, in from . import backend File "C:\Python27\lib\site-packages\keras\backend__init__.py", line 64, in from

tensorflow store training data on GPU memory

China☆狼群 提交于 2019-11-27 12:31:40
问题 I am pretty new to tensorflow. I used to use theano for deep learning development. I notice a difference between these two, that is where input data can be stored. In Theano, it supports shared variable to store input data on GPU memory to reduce the data transfer between CPU and GPU. In tensorflow, we need to feed data into placeholder, and the data can come from CPU memory or files. My question is: is it possible to store input data on GPU memory for tensorflow? or does it already do it in

How to switch Backend with Keras (from TensorFlow to Theano)

▼魔方 西西 提交于 2019-11-27 11:40:15
I tried to switch Backend with Keras (from TensorFlow to Theano) but did not manage. I followed the temps described here but it doesn't work. I created a keras.json in the keras' directory (as it did not exist) but it doesn't change anything when I import it from Python. Create a .keras (note the . in front) folder in you home directory and put the keras.json file there. For example, /home/DaniPaniz/.keras/keras.json (or ~/.keras/keras.json in short) if you are on a UNIX like system (MacOS X, Linux, *BSD). On Windows you want to create the folder %USERPROFILE%/.keras and put the JSON file

Installing theano on Windows 8 with GPU enabled

若如初见. 提交于 2019-11-27 11:23:33
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\libs compiler_bindir=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\ [blas] ldflags = When I

input dimensions to a one dimensional convolutional network in keras

帅比萌擦擦* 提交于 2019-11-27 10:54:52
问题 really finding it hard to understand the input dimensions to the convolutional 1d layer in keras: Input shape 3D tensor with shape: (samples, steps, input_dim). Output shape 3D tensor with shape: (samples, new_steps, nb_filter). steps value might have changed due to padding. I want my network to take in a time series of prices (101, in order) and output 4 probabilities. My current non-convolutional network which does this fairly well (with a training set of 28000) looks like this:

NaN loss when training regression network

别来无恙 提交于 2019-11-27 10:39:42
I have a data matrix in "one-hot encoding" (all ones and zeros) with 260,000 rows and 35 columns. I am using Keras to train a simple neural network to predict a continuous variable. The code to make the network is the following: model = Sequential() model.add(Dense(1024, input_shape=(n_train,))) model.add(Activation('relu')) model.add(Dropout(0.1)) model.add(Dense(512)) model.add(Activation('relu')) model.add(Dropout(0.1)) model.add(Dense(256)) model.add(Activation('relu')) model.add(Dropout(0.1)) model.add(Dense(1)) sgd = SGD(lr=0.01, nesterov=True); #rms = RMSprop() #model.compile(loss=

build a .exe for Windows from a python 3 script importing theano with pyinstaller

怎甘沉沦 提交于 2019-11-27 09:50:48
edit September, 2, 2017, 1pm I eventually managed to build a .exe with pyinstaller after many episodes. Unfortunately I failed to deal with the ‘theano’ module (that is required in my case by the ‘pymc3’ module) and I had to modify the .py files and give up part of the application. My description below has two aims: first it may help; second could anyone help me building a .exe for windows 7+, with the ‘theano’ module ? reminder: My python 3 script opens a simple GUI made with Qt Designer in a ‘.ui’ file and imports pyqtgraph (with pyqt5), pymc3 (and thus theano that is required by pymc3),

Keras import error Nadam

烈酒焚心 提交于 2019-11-27 09:41:06
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 installation, the Nadam import works. But Nadam won't import in my script. So it's a path issue? ivan