I'm using sample code from Keras blogs (with a few tweaks) but when running my model's loss and accuracy metrics aren't improving.
I'm not sure if implementing some function incorrectly.
I'm loading images from a saved file(h5py) and in small…
I have the following network which works fine:
left = Sequential()
left.add(Dense(EMBED_DIM,input_shape=(ENCODE_DIM,)))
left.add(RepeatVector(look_back))
However, I need to replace the Dense layer with the Embedding layer:
left =…
I created the following network. The idea is to combine the outputs of the left and right, then send to a LSTM model.
EMBED_DIM = 4
look_back = 6
feature_num = 2
ENCODE_DIM = 676
left =…
I am currently trying to train a DNN for speech recognition with large number of speakers, each having their own label (output_classes = Total number of speakers).
My database right now has 300 speakers and the Keras model summary is as…
I make a small keras model and get weights of model using following code:
from keras.models import Sequential
from keras.layers import Dense, Flatten,Conv2D, MaxPooling2D
input_shape = (28, 28, 1)
model = Sequential()
model.add(Conv2D(1,…
I train MNIST data using following CNN model and save weights as mnist_weights.h5 for reproducing the result.
import keras
from __future__ import print_function
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers…
I have an issue to reshape an intermediate layer after a Convolution1D layer. The output of the convolution layer is (None, 15, 30) and I want to reshape it into (None, 15, 30, 1). Here the piece of code:
model = Sequential()
model.add(Reshape((-1,…
I'm addressing a sentence-level binary classification task. My data consists of 3 subarrays of tokens: left context, core, and right context.
I used Keras to devise several alternatives of Convolutional Neural Networks and validate which one best…
I have tried many times and read the answer to the question similar to me, but still did not solve.
Error when checking input: expected acc_input to have 4 dimensions, but got array with shape (200, 3,…
I am trying to use the Keras 2 incepctionV3 based trained model to predict an image for testing purpose. My original model work well, then I try to create a model with specified input_shape (299,299,3)
base_model = InceptionV3(weights='imagenet',…
I'm trying to implement the technique described on the documentation page
https://keras.io/preprocessing/image/
under the heading "Example of transforming images and masks together".
After the following,
image_generator =…
I followed the Keras cat/dog image classification tutorial
Keras Image Classification tutorial
and found similar results to the reported values. I then took the code from the first example in that tutorial Tutorial Example 1 code, slightly altered…
I would like to use an alternating update rule with keras.
I.e. per-batch I would like to call a regular gradient-based step, and next call a custom step.
I thought about implementing it by either inheriting an optimizer or a callback (and use the…
I have a really simple issue that seems to have no built-in solution in Keras.
Here' my problem:
I have a (50,) dimensional tensor (layer 1's output) which is supposed to be multiplied to a (50, 49) dimensional tensor.
These tensors are the output…
Can I generate a Model in keras which is not sequencial, i.e can I design a model with two train of cascaded convolution layer but the starting input is a common convolution output.