TensorFlow CNN Incompatible Shapes: 4D input shape

I have sample data in the form: Data[n][31][31][5][2] with: “[n]” being the sample “[31][31]” being the array of data points “[5]” being the number of bits within that …

Pytorch: 1D target tensor expected, multi-target not supported

I want to train a 1D CNN on time series. I get the following error message 1D target tensor expected, multi-target not supported Here is the code with simulated data corresponding to the structures of …

Why do sometimes CNN models predict just one class out of all others?

I am relatively new to the deep learning landscape, so please don’t be as mean as Reddit! It seems like a general question so I won’t be giving my code here as it doesn’t seem necessary (if it is, …

I created a CIFAR10 dataset learning model using a CNN model. Why is there an error?

I created a CIFAR10 dataset learning model using a CNN model. Why is there an error? How should I fix it? I did it in Google colab environment. import tensorflow as tf import keras from keras.models …

max pooling across one dimension using keras

I have implemented a 3D-convolution neural network. The shape of my input is (500,10,4,1). I only want to convolve in first dimension such that it is ‘fully connected’ in second and third dimension in …

How to save trained images without a burden on network

I am training a convolutional neural network in pytorch and want to save trained images. I append each trained image in a data loader loop to save all the trained images into numpy file (train_pred in …

My deep learning model is not training. How do I make it train?

I’m fairly new to Keras, please excuse me if I made a fundamental error. So, my model has 3 Convolutional (2D) layers and 4 Dense Layers, interspersed with Dropout Layers. I am trying to train a …

How get the predicted label from a Convolution Neural Net in image classification

I have built a CIFAR-10 image classification model with Convolution Neural Net or CNNs. The model fully completed and has got around 59% accuracy, but my problem is that how to get the predicted …

ImageDataGenerator() for CNN with input and output as an Image

I’m looking for a training map with something like this: Grayscale Image -> Coloured Image But the dataset can’t be loaded all to the ram as X and Y because of obvious reasons. I looked up the …

Multiclassification task using keras [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last month. Improve this question Classification (not detection!) of several objects in one image is the problem. How can I do this using keras. For example if I have 6 classes (dogs,cats,birds,…) and two different objects (a cat and a bird) in this image. The label would be of the form: [0,1,1,0,0,0] Which metric, loss function and optimizer is recommended? I would like to use CNN.