Category "keras"

ValueError: cannot reshape array of size 921600 into shape (224,224,3)

I trained a model using Transfer Learning(InceptionV3) and when I tried to predict the results it shows: ValueError: cannot reshape array of size 921600 into sh

ValueError: Input 0 of layer is incompatible with the layer: expected shape=(None, 224, 224, 3), found shape=(224, 224, 3)

"after converting the dataset to the tfrecord file format, I tried to train the model I created with it, but I couldn't convert it to the input format suitable

ValueError: Unknown metric function: cosine

i have been getting valueError issue. Currently using python3.9.11., keras2.8. if loss_init=="r2": parallel_model.compile(loss=custom_r2_loss, o

Can you mix keras.layers output with tensorflow operations?

I know that output of keras layers (like keras.layers.Dense()) produce so-called 'keras tensors'. Also, there are 'tensorflow tensors' that are produced by tens

training = False in Keras Sequential API

We can pass the training = False argument while calling the pre-trained model when using Keras Functional API as shown in this tutorial. How to implement the sa

Can't I simply copy and paste a program from a Jupyter notebook to a file.py?

It's weird, I wrote a functioning program on a Jupyter notebook and I wanted to have it in a normal python file with VSCode aswell. However, while copying and p

Keras model - high accuracy on natively executed code, fails to learn in colab

I am doing classification of citrus leaves dataset. I came up with a very basic model and ran it in Jupyter notebook on my machine, using anaconda. Exact same m

list indices must be integers or slices, not ListWrapper

I'm having some trouble with a pretty basic model. Am unable to create a pre-processing layer that simply normalizes all features. It is likely that my concept

Validation accuracy not changing while loss is decreasing in keras image classification? [closed]

Image classification Problem I have two classes of images. Fake Real Dataset splitting detail is below. Total Training FAKE Images 3457 Total

Tensorflow my GPU is not recognized and There are many dll errors

I'm too new with tensorflow and keras, actually I'm trying first to install it correctly. I used Anaconda to make it easier. My question is probabily related to

Cant properly load saved model and call predict method

I am having trouble loading large model after saving. have tried all below saveing methods: tf.saved_model.save(model, model_save_path) model.save(model_save_pa

NaN for Keras Tuner score for RandomSearch

I am trying out Keras (2.8.0) autotuner for a regression problem. Here is my code: import pandas as pd from tensorflow import keras from keras import layers, lo

Keras: "RuntimeError: Failed to import pydot." after installing graphviz and pydot

I'm using Anaconda Python 2.7 on windows 10 I was planning on doing Keras visualization so (whilst spyder was open) I opened the Anaconda command prompt and pi

When importing from keras in Jupyter, getting error 'NoneType' object has no attribute 'message_types_by_name'

I am trying to do several imports from the keras library. I am doing this on a Jupyter notebook using an Anaconda installed Python. I have used keras before fin

Tensorflow fit method with generator error. AttributeError: 'tuple' object has no attribute 'shape'

I'm trying to get a basic segmentation model going before making major tweaks and no matter how simple I make it I receive this error. I'm working on Collaborat

Using 3d sparse input with partial shape in Keras/Tensorflow gives error

I am trying to create a dense neural network where my input is a sparse 3d matrix. When converted to a dense matrix the shape is (2, None, n) (where n is a numb

Conv2D output shape in CNN too small

The input shape in the first Conv2D layer is supposed to be (100, 100, 1) however the output is (None, 98, 98, 200). I understand what 200 and None determine bu

ImportError('Could not import PIL.Image. ' working with keras-ternsorflow

I'm following some lectures from lynda.com about deep learning using Keras-TensorFlow in a PyCharmCE enviroment and they didn't have this problem. I get this er

having a very large loss when I am training a regression loss

I want to predict the center of the pupil from an image. so I used a CNN with 3 Dence layer. so the input is an image and the output is a coordinate (X,Y). my m

fit_generator() to save model with least validation loss

How do I use keras function fit_generator() to train and simultaneously save the model weights with lowest validation loss?