shape of an output tensor after convolutional filter on a colour image

I find it difficult to understand a notion about tensors. For VGG (https://www.tensorflow.org/api_docs/python/tf/keras/applications/VGG16), we start from a batch of colour images (none,224,224,3) and …

Keras model.evaluate accuracy stuck at 50 percent while using ImageDataGenerator

I am trying to find the accuracy of my saved Keras model using model.evaluate. I have loaded in my model using this: model = keras.models.load_model(“../input/modelpred/…

How to add code lines when calling a function depending on an iterator on Python

I am trying to test many ML models using keras.models.Sequential. My idea is that once I have an iterator that looks like [num_layers, num_units_per_layers], for example [(1, 64),(2, (64,128))], to …

Adaptive Threshold error: (-215:Assertion failed) src.type() == CV_8UC1 in function ‘adaptiveThreshold’

I am working on pre-trained vgg16 model, for that I need to have input size of image file to be (224,224,3). The code I am working on is: from tensorflow.keras.preprocessing import image import cv2 …

Tensorflow dataset from numpy array

I have two numpy Arrays (X, Y) which I want to convert to a tensorflow dataset. According to the documentation it should be possible to run train_dataset = tf.data.Dataset.from_tensor_slices((X, Y)) …

extracting images and their label one by one from ImageDataGenerator().flow_from_directory

so I imported my dataset(38 classes) for validation using ImageDataGenerator().flow_from_directory valid = ImageDataGenerator().flow_from_directory(directory=”dataset/valid”, target_size=(…

Why is the result of the code offered by Deep Learning with TensorFlow different from the snapshot in its book

In the first chapter of Deep Learning with TensorFlow, it gives an example on how to build a simple neural network for recognizing handwritten digits. According to its description, the code bundle for …

How to deploy deep learning models in cloud? [closed]

I have built a deep learning model with python using keras (LSTM classifier for emotion speech recognition) and it’s works perfectly locally, but when i load the model or pass an audio to classify i …

Is the linear model trainable in Convolution or NN?

If I’ve an following layer x = Conv2D(x, activation=’linear’) Is this layer trainable? As we know derivative of linear function is constant, so in this cases will the weight get ever updated? …

ValueError when using vae.fit in Keras

I am creating a vae model over the mnist dataset with hopes of plotting the loss function against the epochs. However I am experiencing some issues and was unable to find a solution online. During my …