Skip to main content

Questions tagged [keras]

Keras is a neural network library providing a high-level API in Python and R. Use this tag for questions relating to how to use this API. Please also include the tag for the language/backend ([python], [r], [tensorflow], [theano], [cntk]) that you are using. If you are using tensorflow's built-in keras, use the [tf.keras] tag.

0 votes
0 answers
8 views

CGAN Training Issues: Discriminator Accuracy at 100% and Generator Loss at 0

I am trying to train a Conditional Generative Adversarial Network (CGAN) to generate synthetic leaf images. However, during training, my discriminator's accuracy quickly reaches 100%, and the ...
Dawood Ahmad's user avatar
-1 votes
0 answers
6 views

How to save this RNN model and how use this to build api to translation?

I used sinhala english data set and trained it to translate sinhala english java related questions. It gives good training accuracy but problem is after save it unable to load and use it to develop ...
Kalpani Athukorala's user avatar
-2 votes
1 answer
16 views

Combine three trained binary classification models into single multiclassification model in keras

I have three trained binary classification models, they are trained with sigmoid activation at output layer. First model returning probability scalar from 0 to 1 to check whether image is number ZERO ...
Muhammad Ikhwan Perwira's user avatar
0 votes
0 answers
13 views

num_samples = set(int(i.shape[0]) for i in tree.flatten(data)) IndexError: tuple index out of range (Tensorflow)

When trying to train an Tensorflow LSTM I am getting the following error: File "C:\Users\user\Documents\LSTM_Volatility.py", line 66, in <module> model.fit(x_train , ...
Harry Dunn's user avatar
0 votes
1 answer
22 views

Hide warnings and/or errors when importing Keras

My script imports the following Keras modules: from keras.models import Sequential from keras.layers import Dense, Input from keras.utils import to_categorical and every time the same warnings/errors ...
Gabriel's user avatar
  • 42.1k
0 votes
0 answers
25 views

Input 0 of layer "dense" is incompatible with the layer: expected axis -1 of input shape to have value 36864, but received input with shape (190,1536)

I am trying to create a model for image classification for grayscale images. and got the error: ValueError: Exception encountered when calling Sequential.call(). Input 0 of layer "dense" is ...
longlegedcorgi's user avatar
0 votes
0 answers
7 views

How to preprocess image for INT8 post training quantization?

I am working on a binary classification problem using DenseNet121 on Keras. The original model yields an accuracy of ~93% and when float16 quantized (PTQ), accuracy acceptably drops to ~90%. I was ...
peacer's user avatar
  • 45
0 votes
1 answer
31 views

Model.evaluate() returning a float, not a list

I have a multi-task neural network. I want to make sure that when I call Model.evaluate() on my model, that the score I see is the sum of the losses. However, it is returning a scalar rather than a ...
BigBossRob's user avatar
0 votes
0 answers
16 views

Cast error while training a keras model constructed using featurespace

I am new to machine learning and using tf/keras to build a simple model to train on Adult database which I downloaded from UCI. The data has 14 features. I am using keras FeatureSpace API to contruct ...
Zin Master's user avatar
0 votes
0 answers
21 views

Can you put target value in input x in keras lstm model?

In keras documentation: Arguments x: A tf.data.Dataset. Should return a tuple of either (inputs, targets) or (inputs, targets, sample_weights). A keras.utils.PyDataset returning (inputs, targets) or (...
tipsywacky's user avatar
  • 3,454
0 votes
0 answers
19 views

Custom Parametric Activation Function Leading to NaN Loss and Weights

I am trying to create a custom non-linear activation function, and use a 3 3 hidden layer neural network to do MNIST classification. When I use 'Relu' the network trains fine, but when I use my custom ...
Anish Mondal's user avatar
0 votes
1 answer
31 views

Error converting Tensorflow model to CoreML model

NotImplementedError Traceback (most recent call last) Cell In[19], line 1 ----> 1 mlmodel = ct.convert(model, convert_to="mlmodel", source="tensorflow") ...
Aakash Kothari's user avatar
0 votes
0 answers
31 views

Error while exporting Tensorflow model to CoreML

'Sequential' object has no attribute '_get_save_spec' import tensorflow as tf import coremltools as ct print(tf.__version__) # Load your existing Keras model model_path = "/Users/name/Desktop/...
Aakash Kothari's user avatar
0 votes
0 answers
17 views

Error when implementing SHAP on CNN model

So I am trying to implement SHAP to a CNN model I trained on an image dataset on Kaggle. But I keep getting the following Attribute Error: --------------------------------------------------------------...
B.RATH's user avatar
  • 1
0 votes
0 answers
25 views

AttributeError: module 'keras.src.activations' has no attribute 'get'

I am running the following error when I try to optimize a LSTM using keras tuner in Python: AttributeError: module 'keras.src.activations' has no attribute 'get'. I am using the following versions: | ...
george1994's user avatar

15 30 50 per page
1
2 3 4 5
2832