# Tagged Questions

Keras is a minimalist, highly modular neural network library providing a high-level Python API that allows for rapid prototyping, and allows the use of one of several computational back-ends.

**3**

votes

**1**answer

511 views

### ValueError at /image/ Tensor Tensor(“activation_5/Softmax:0”, shape=(?, 4), dtype=float32) is not an element of this graph

I am building an image processing classifier and this code is an API to predict the image class of the image the whole code is running except this line (pred=model.predict_classes(test_image)) this ...

**54**

votes

**5**answers

104k views

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

I am trying to work on neural networks in Python using the following Keras packages:from keras.utils import np_utilsfrom keras.layers.core import Dense, Activation, Dropoutfrom keras.models import ...

**22**

votes

**6**answers

22k views

### Keras, How to get the output of each layer?

I have trained a binary classification model with CNN, and here is my codemodel=Sequential()model.add(Convolution2D(nb_filters, kernel_size[0], kernel_size[1],border_mode=...

**2**

votes

**2**answers

148 views

### ValueError: Error when checking target: expected model_2 to have shape (None, 252, 252, 1) but got array with shape (300, 128, 128, 3)

hi I am building a image classifier for one-class classification in which i've used autoencoder while running this model I am getting this error by this line (autoencoder_model.fit) (ValueError: Error ...

**0**

votes

**1**answer

226 views

### Keras misinterprets training data shape

My training data has the form (?,15) where ? is a variable length.When creating my model I specify this:inp=Input(shape=(None,15))conv=Conv1D(32,3,padding='same',activation='relu')(inp)......

**33**

votes

**6**answers

25k views

### Keras binary_crossentropy vs categorical_crossentropy performance?

I'm trying to train a CNN to categorize text by topic. When I use binary_crossentropy I get ~80% acc, with categorical_crossentrop I get ~50% acc.I don't understand why this is. It's a multiclass ...

**6**

votes

**1**answer

3k views

### How do you create a custom activation function with Keras?

Sometimes the default standard activations like ReLU, tanh, softmax, ... and the advanced activations like LeakyReLU aren't enough. And it might also not be in keras-contrib.How do you create your ...

**90**

votes

**1**answer

10k views

### Understanding Keras LSTMs

I am trying to reconcile my understand of LSTMs and pointed out here: http://colah.github.io/posts/2015-08-Understanding-LSTMs/ with the LSTM implemented in Keras. I am following the blog written http:...

**22**

votes

**2**answers

9k views

### Neural Network LSTM input shape from dataframe

I am trying to implement an LSTM with Keras.I know that LSTM's in Keras require a 3D tensor with shape (nb_samples, timesteps, input_dim) as an input. However, I am not entirely sure how the input ...

**8**

votes

**4**answers

2k views

### When does keras reset an LSTM state?

I read all sorts of texts about it, and none seem to answer this very basic question. It's always ambiguous:In a stateful=False LSTM layer, does keras reset states after:Each sequence; or ...

**24**

votes

**1**answer

5k views

### Many to one and many to many LSTM examples in Keras

I try to understand LSTMs and how to build them with Keras. I found out, that there are principally the 4 modes to run a RNN (the 4 right ones in the picture)Now I wonder how a minimalistic code ...

**5**

votes

**2**answers

2k views

### How to export Keras .h5 to tensorflow .pb?

I have fine-tuned inception model with a new dataset and saved it as ".h5" model in Keras. now my goal is to run my model on android Tensorflow which accepts ".pb" extension only. question is that is ...

**2**

votes

**1**answer

206 views

### How does Keras evaluate the accuracy?

If there's a binary classification problem, and if label are 0 and 1i know the prediction is a float number because p is possibility of belonging to that class.But labels are 0 1.They're all not ...

**4**

votes

**2**answers

2k views

### Tensorflow + Keras + Convolution2d: ValueError: Filter must not be larger than the input: Filter: (5, 5) Input: (3, 350)

I have been trying to run the code below which I got from here and even though I have changed almost nothing other than the image size (350,350 instead of 150, 150) is still cannot get it to work. I ...

**3**

votes

**1**answer

259 views

### Layer conv2d_3 was called with an input that isn't a symbolic tensor

hi I am building a image classifier for one-class classification in which i've used autoencoder while running this model I am getting this error (ValueError: Layer conv2d_3 was called with an input ...