Category "deep-learning"

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

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

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

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

Tensorflow "decode_png" keeps printing "Cleanup called..."

I'm using tensorflow to open some .png images and every image it opens, an annoying message is printed. def open_img(path): img = tf.io.read_file(path)

ModuleNotFoundError: No module named 'fastai.vision'

I am trying to use ImageDataBunch from fastai, and it worked fine, but recently when I ran my code, it showed this error ModuleNotFoundError: No module named 'f

Error while defining observation space in gym custom environment

I am working on a reinforcement algorithm, I am very new to this and trying to get a hold of things. Player1Env looks upon a 7x6 Connect4 playing grid. I am ini

Keras loss is NaN when training for semantic segmentation

I am using the headsegmentation dataset. A single mask looks like this All mask images are a single channel. This is my code: image_size = 512 batch = 4 labels

OSError while calling Detectron2LayoutModel

After successfully installing Layout Parser in Windows, getting the below OS Error. Code Used: model = lp.Detectron2LayoutModel(config_path="lp://PubLayNet/mask

Input 0 of layer "sequential_3" is incompatible with the layer: expected shape=(None, 256, 256, 3), found shape=(None, 324, 500, 3)

I'm having an issue if anyone can help please comment input_shape=(BATCH_SIZE,256,256,3) model=models.Sequential([ resize_and_rescale, data_aug

Pytorch RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn

This code is built up as follows: My robot takes a picture, some tf computer vision model calculates where in the picture the target object starts. This informa

Tensorflow seq2seq - keep max three checkpoints not working

I am writing a seq2seq and would like to keep only three checkpoints; I thought I was implementing this with: checkpoint_dir = './training_checkpoints' checkpoi

tensorflow:Can save best model only with val_acc available, skipping

I have an issue with tf.callbacks.ModelChekpoint. As you can see in my log file, the warning comes always before the last iteration where the val_acc is calcula

Cannot Train Wav2vec XLSR Model With Common Voice Data

I am trying to train a transformer ASR model with wav2vec XLSR in the danish language, but whenever I try to pull the danish dataset with datasets library it's

LSTM/GRU setting states to random noise instead or resetting to zero

I train the following model based on GRU, note that I am passing the argument stateful=True to the GRU builder. class LearningToSurpriseModel(tf.keras.Model):

making GRU/LSTM states trainable in Tensorflow/Keras and add some random noise

I train the following model based on GRU, note that I am passing the argument stateful=True to the GRU builder. class LearningToSurpriseModel(tf.keras.Model):

How to properly initialize TensorFlow GRU-layer with noisy states?

I wish to experiement with noisy GRU states instead of resetting them to zero for each batch. I try below an implementation. My initial code was resetting initi

Is it possible to automatically infer the class_weight from flow_from_directory in Keras?

I have an imbalanced multi-class dataset and I want to use the class_weight argument from fit_generator to give weights to the classes according to the number o