Skip to main content

All Questions

1 vote
1 answer
2k views

AttributeError: 'Functional' object has no attribute 'fit_generator'

This is my code for an image processing model - import os os.environ['TF_ENABLE_ONEDNN_OPTS'] = '0' from keras.layers import Input, Lambda, Dense, Flatten from keras.models import Model from keras....
seasonedpopcorn's user avatar
0 votes
1 answer
259 views

AttributeError: module 'keras.utils' has no attribute 'shape'

def convert_to_grayscale(self): subdirectories = self.list_subdirectories() for subdirectory_name in subdirectories: subdirectory_path = os.path.join(self.base_dir, subdirectory_name) ...
RASHEDIN's user avatar
1 vote
0 answers
67 views

Is there a way to preprocess a single image using the same method as in tf.keras.utils.image_dataset_from_directory?

I have trained a keras model and used tf.keras.utils.image_dataset_from_directory to preprocess the images. Now when I'm trying to test the model on a single image it's always predicting the same ...
Ibrahim Younis's user avatar
0 votes
0 answers
60 views

How can I add my implemented code as a preprocessing layer to tensorflow Sequential?

I want to add a custom function as a layer for image processing tasks in TensorFlow Keras Sequential. The custom function will hold my code logic of image processing. But, I couldn't find the solution ...
Mohammad Ishfakur's user avatar
0 votes
1 answer
56 views

mixup for gray image input and color image output

Mixup is a technique to smoothen the training of a neural network by applying convex combination to training inputs: https://keras.io/examples/vision/mixup/ In the example, the input is gray image and ...
Dr Linh Chi Nguyen's user avatar
0 votes
1 answer
50 views

ValueError: Dimension 2 in both shapes must be equal, but are 128 and 32. Shapes are [3,3,128,32] and [3,3,32,9]

I'm trying to build a model to perform reconstruction of speech by feeding image frames from a video. But during the prediction, I got the error. Please help me resolve the error. ValueError: ...
gurukishoreg78's user avatar
0 votes
1 answer
206 views

shape must be rank 4 but is rank 5 for max pool layer

Hi I want to build a CNN Model for RGB images of 32x32x3 But the max pooling returns error saying: ValueError: Exception encountered when calling layer "max_pooling2d_11" (type MaxPooling2D)....
Dr Linh Chi Nguyen's user avatar
0 votes
1 answer
204 views

Image segmentation with Keras and Tensorflow: logits and labels must have the same first dimension when using U-Net architecture

I'm using this tutorial from the keras website: Image segmentation with a U-Net-like architecture. The tutorial runs well, so I want to adapt it for my own use. I have my own data (250x250 images and ...
Joaquin's user avatar
  • 161
0 votes
0 answers
48 views

(Tensorflow) Parameter prediction from image

First I will give some context of my situation: I have a laser that after propagation is observed by a camera. Now the initial parameters of the laser will determine the pattern observed in the image ...
David's user avatar
  • 1
1 vote
1 answer
130 views

How to cut and paste a part of an image randomly to a different location using tensorflow?

I am trying to implement a custom layer in keras.layers where I want to do a custom image augmentation. My idea is to cut out a part of an image from a random location and paste it to a different ...
Divyaj Shah's user avatar
0 votes
1 answer
388 views

Import errors when importing keras and tensorflow in Jupyter Notebook

I installed python 3.7. Then gave the pip command for install Jupyter. Then pip upgrade notification came and I upgraded pip. Then Jupyter notebook also installed. Then in my application I wanted to ...
Smarty Coder's user avatar
-1 votes
1 answer
129 views

Is there a differentiable algorithm for image quantization?

I am implementing an autoencoder, used to rebuild color images. The loss function I want to use requires a reduced color set (max ~100 different colors) but I am struggling to find a suitable ...
Simone Berasi's user avatar
0 votes
2 answers
763 views

How to display the number of objects in an image for single class?

I am new to programming and been learning the tutorial in google colab for algorithm in object detection. Below is the code used in google object detection API https://github.com/tensorflow/models/...
CKT's user avatar
  • 1
0 votes
1 answer
120 views

I want to use a trained keras model to make predictions on a handwritten text in an Image

After training, I loaded up my model and passed in the CTC Layer, I downloaded a test Image online and called model.predict(x=image) but I kept getting errors about the image's shape. I then tried to ...
isorae dennis's user avatar
-1 votes
1 answer
188 views

The prediction for an image classification algorithm is not printing

I have trained a model for image classification in Jupyter Notebook, and have gotten to the point of testing an image to see if it is "Pasta = 0" or "Pizza = 1". The model is ...
Nachiket Kulkarni's user avatar

15 30 50 per page
1
2 3 4 5
15