Questions tagged [keras-2]

with a new API.

Keras API will now become available directly as part of

264 questions
0
votes
0 answers

Keras cnn model output shape doesn't match model summary

I am trying to use the convolution part of ResNet50() model, as this: #generate batches def get_batches(dirname, gen=image.ImageDataGenerator(), shuffle=True, batch_size=4, class_mode='categorical', target_size=(224,224)): return…
user3768495
  • 4,077
  • 7
  • 32
  • 58
0
votes
1 answer

Keras merge/concatenate models outputs as a new layers

I want to use pretrained models' convolutionnal feature maps as input features for a master model. inputs = layers.Input(shape=(100, 100, 12)) sub_models = get_model_ensemble(inputs) sub_models_outputs = [m.layers[-1] for m in…
Guillaume Chevalier
  • 9,613
  • 8
  • 51
  • 79
0
votes
1 answer

How to save features into .mat file and .txt file using python in keras?

I would like to save my predicted features into .mat format and .txt format in keras for further process in Matlab. Please help me. Thanks.
Rajesh
  • 221
  • 4
  • 16
0
votes
0 answers

Keras doesn't train using fit_generator()

I am using Keras 2.0.4 (TensorFlow backend) for an image classification task. I am trying to train my own network (without any pretrained parameters). As my data is huge I cannot load all into memory. For this reason I use ImageDataGenerator(),…
D.Laupheimer
  • 1,074
  • 1
  • 9
  • 21
0
votes
3 answers

Keras : TypeError: ('Keyword argument not understood:', 'nb_depth')

I am using Keras library for videos in python. My Keras version is 2.0.2 kernel_size=3 model = Sequential() model.add(Convolution3D(nb_filters[0], kernel_size,nb_depth=nb_conv[0], nb_row=nb_conv[0], nb_col=nb_conv[0],input_shape=(1,…
Simran Garg
  • 1
  • 1
  • 2
-1
votes
1 answer

Should shuffle be set to True during Keras Tuner?

I am using Keras Tuner to hypertune my model. I am setting the parameter value “validation_split = 0.2” in the search() call. Does it still make sense to pass “shuffle = True” or is that redundant / counter-productive? tuner = RandomSearch( …
Asim Raja
  • 39
  • 1
  • 6
-1
votes
2 answers

Wrong prediction while loading the model using Keras load_model() as if no model training happened. This is happening only with the EMNIST dataset

I have trained my model using EMNIST byclass dataset by loading .csv files of training and testing data as well as label for digit (0-9) and letter (A-Z, a-z) classification. I got the model evaluation accuracy around 87%. But when I am using the…
Deb
  • 11
  • 2
-1
votes
1 answer

how to avoid Flatten() in Keras

I am working on an images classification using Keras. There is my model: model = Sequential() model.add(Conv2D(filters = 8, kernel_size = (3,3),padding = 'Same', activation ='relu', input_shape =…
-5
votes
1 answer

Precision@n and Recall@n in Keras Neural Network

Basically, i want to compute top k of precision@n and recall@n of each epoch in keras neural networks. After a long search, i found custom function which are... def precision(y_true, y_pred): true_positives = K.sum(K.round(K.clip(y_true * y_pred, 0,…
1 2 3
17
18