Category "keras"

When using padding in sequence models, is Keras validation accuracy valid/ reliable?

I have a group of non zero sequences with different lengths and I am using Keras LSTM to model these sequences. I use Keras Tokenizer to tokenize (tokens start

ValueError: Shapes (None, None) and (None, 28, 28, 10) are incompatible

I am working on a neural network to recognize handwritten digits using the MNIST digits dataset. I wanted to use ImageDataGenerator from Keras to see if I could

Error: import tensorflow.keras.backend as K could not be resolved Pylance(reportMissingImports)

I'm using tensorflow 1.15.0 in docker container and have issue in importing keras sub-modules. from tensorflow import keras import tensorflow.keras.backend as

ModuleNotFoundError: No module named 'tensorflow.python.eager' when loading Sequential model

When attempting to import Sequential from keras.models, I get the error shown below. I have already uninstalled and reinstalled tensorflow through PIP, but am n

Tensorflow AttributeError: module tensorflow has no attribute v1

A Python Tensorflow Keras app runs Azure VM Windows Server 2019 Datacenter. I copied the requirements.txt file and install on a 2nd VM. On the statement "impor

UnimplementedError: Graph execution error: running nn on tensorflow

I have been having this error, and I don't know why, especially since I am following someone's code exactly and the person had no error when running this img_sh

ValueError: Input 0 of layer "lstm" is incompatible with the layer: expected ndim=3, found ndim=2. Full shape received: (None, 1024)

I was following Transfer learning with YAMNet for environmental sound classification tutorial. Here is the link: https://www.tensorflow.org/tutorials/audio/tran

Basic CNN classification model has UnimplementedError: Graph execution error:

I tried a sample code for CNN application on MNIST data classification from the book : from keras import layers from keras import models model = models.Sequent

tensorflow model.evaluate and model.predict very different results

I am building a simple CNN for binary image classification, and the AUC obtained from model.evaluate() is much higher than AUC obtained from model.predict() + r

Yolo to keras to coreml : get confidence and coordinates as outputs

❓Question Hi, Following steps were taken I trained yolo tiny on a custom data set with just one class Converted .weights(darknet) to .h5 (keras) (verif

Heroku : tensorflow 2.2.1 too large for deployment

im trying to deploy a keras project to heroku but pushing to the repository master branch seems to be problematic for me as the following error is reported ever

How does keras.evaluate() calculate the loss?

I am building a MLP using TensorFlow 2.0. I am plotting the learning curve and also using keras.evaluate on both training and test data to see how well it perfo

keras.utils importError in Colab cannot import name "to_categorical"

I'm using Google's Colab to run the Deep Learning codes from the Book " Deep Learning with python" by François Chollet. The 1st exercise is to use the mn

Reshape the input for BatchDataset trained model

I trained my tensorflow model on images after convert it to BatchDataset IMG_size = 224 INPUT_SHAPE = [None, IMG_size, IMG_size, 3] # 4D input model.fit(

Using tf.data.Dataset as training input to Keras model NOT working

I have a simple code, which DOES work, for training a Keras model in Tensorflow using numpy arrays as features and labels. If I then wrap these numpy arrays usi

Run keras.Models.fit() in graph

How to run keras.model.fit() in graph not with eager execution...?? I tried to run my model in graph by using tf.compat.v1.disable_eager_execution(), but the c

AttributeError: 'float' object has no attribute 'dtype'

When I try to use a custom activation function in keras (2.2.5), I create a new activation function gelu. add it in activations.py : from . import backend as K

Follow-up question regarding a Keras model issue

So about a week ago I posted this question: Issues running a Keras model with custom layers. The suggestion there was to try to make this question smaller and t

A `Concatenate` layer requires inputs with matching shapes except for the concatenation axis. Received: input_shape=[(None, 28), (None, 28, 28)]

""" Defining two sets of inputs Input_A: input from the features Input_B: input from images my train_features has (792,192) shape my train_images has (792,28,28

@tf.function( input_signature ) on an object's method defined outside of a class scope

Say I have a Custom Layer : class Custom_Layer(keras.layers.Layer): def __init__(self, **kwargs): self.w_0 = tf.Variable(tf.random_uniform_initializ