Questions tagged [conv-neural-network]
A convolutional neural network (CNN, or ConvNet) is a class of deep, feed-forward artificial neural networks that has successfully been applied to analyzing visual imagery. It falls under the [deep-learning] tag.
9,626
questions
0
votes
0
answers
11
views
How to create CNN with multiple output?
I am trying to create a regression CNN for a dataset of 96 features and 21 outputs (all postive numbers).
I keep getting this error on fit:
"Input 0 of layer "Conv1D_1" is incompatible ...
0
votes
0
answers
5
views
How to change the shape of input dimention for Conv1D convolutional error in keras?
I have a binary classification problem. I want to include a Conv1D layer but am having a trouble with the input shape with changing the input shape from 2D from 3D (https://www.tensorflow.org/...
0
votes
0
answers
12
views
How can I make my CNN output_feature = 1 since I am testing for 0 or 1
class BreastCancerCNN(ImageClassificationBase):
def __init__(self):
super().__init__()
self.network = nn.Sequential(
nn.Conv2d(3, 32, kernel_size=3, padding=1),
...
1
vote
1
answer
14
views
Matrix 2D on Convolutional Netowrk
that may be a silly question, but I wanted to use a convolutional neural network in my deep reinforcement learning project and I got a problem I don't understand.
In my project I want to insert into ...
0
votes
2
answers
17
views
How to get the input and output feature maps of a CNN model?
I am trying to find the dimensions of an image as it goes through a convolutional neural network at each layer. So for instance, if there is max-pooling or convolution being applied, I’d like to know ...
0
votes
0
answers
11
views
How to convert CNN project develop in Matlab to Python
I want to convert a Convolutional Neural Network project developed in Matlab to python. The project directory is located here
I have tried to convert this Deep Features for Text Spotting project to ...
0
votes
0
answers
5
views
Is there a way to input a numeric data in cnn and the output is also regression?
Currently I am working in a project where I predict the future gold prices using cnn method. I have been searching for a way so that I can use numbers as input (historical prices) and I need to get ...
0
votes
1
answer
21
views
ValueError: Input 0 of layer "sequential_13" is incompatible with the layer: expected shape=(None, 21367, 9000), found shape=(None, 9000)
I don't know why this error keep coming when I run the code below
CNN.fit(X_train_vector, y_train, epochs=10)
My CNN code is this:
CNN = tf.keras.models.Sequential()
CNN.add(tf.keras.layers.Conv1D(...
0
votes
0
answers
17
views
TensorFlow time series input/output question
Help, please!
I have a TensorFlow time series problem with the constraint that the model's input layer should be shape of (batch, before = 5, features = 1) and the model's output shape should be (...
0
votes
1
answer
19
views
AttributeError: 'Functional' object has no attribute 'predict_classes''
I am trying to use run a GoogLeNet code using FERET datasets. When I run the code, I get the following error message:
Traceback (most recent call last):
File "C:\Users\JoshG\PycharmProjects\...
-2
votes
0
answers
16
views
Is there a way to use CNN for non-image datasets?
I am studying the NSL-KDD dataset representing network traffic features and classificating it as normal or one of 4 intrusion types. I used the one-hot encoding and normalization, so each feature of ...
0
votes
0
answers
8
views
Pytorch freezes when checking dataloader
I am running this block of codes for Pytorch and it seems to run forever/freeze in my notebook. I suspect it has something to do with my dataloader but I can't seem to figure out what is wrong here. I ...
0
votes
0
answers
13
views
how to calculate gradient of input with respect of loss in cnn
https://zzutk.github.io/docs/reports/2016.10%20-%20Derivation%20of%20Backpropagation%20in%20Convolutional%20Neural%20Network%20(CNN).pdf
according to equations (49) and (51) in the PDF above,when I do ...
1
vote
0
answers
27
views
convert an csv file that has RGB pixel values to image
i have this dataset on kaggle which has the pixel values of RGB image of retina vessels as csv file
i want to convert this csv file into an image to use it in CNN in python . after which i want to ...
0
votes
1
answer
28
views
CNN Image Analysis, val-accuracy doesn't improve
I have a binary classification problem. I tried many things and I can improve accuracy of the model but the validation accuracy is always fluctuates around ~0.5.
Dataset was originally timeseries. I ...
-1
votes
1
answer
15
views
How to get confusion matrix when using flow_from_directory?
i have faced some problem on how could i create the confusion matrix to calculate the TP/TN/FP/FN/Recals/Acc to evaluate this model . How can i extract a confusion matrix after compiling and fitting ...
0
votes
0
answers
6
views
What is the meaning of this FFDNet paper's line
I just reviewing one paper of FFDNet which is "FFDNet : Toward a Fast and Flexible Solution for CNN-Based Image Denoising"
In page 6 of this paper
" When the training error keeps ...
0
votes
1
answer
25
views
Machine Leanring Test data
I am working on image classification. For CNN image classification, Can I use validation data as test data? or should I split data into three ( train, validation, test )?
0
votes
0
answers
19
views
image captioning with deep learning
can anyone help me ..where is the error here?? can anyone help me please. i am trying to train a model for image captioning in persian language.i try to build my model .. below is the code and the ...
-1
votes
1
answer
16
views
What to do if neural network always performs poorly even after addressing overfitting?
I have a medical image dataset of ~10K 256x256 images with which I am training a deep neural classifier for disease classification. I have been working with popular CNNs like InceptionV3 and ResNets.
...
0
votes
0
answers
22
views
FITS image files as input to CNN network
I have a following problem. I am trying to implement an convolutional autoencoder which takes as input FITS files containing astronomical images. The purpose is to train an autoencoder to compress the ...
0
votes
0
answers
17
views
Artificial Neural Networks for Image Colorization
At the moment, I'm learning about artificial neural networks for colorizing black and white images.
After reading enough literature and considering many examples, I had one, maybe stupid, question: ...
0
votes
0
answers
21
views
How to implement cross-validation-training to improve pytorch cnn (ai)
I am currently working on a pytorch AI (CNN) for indoor-positioning and while building the trainingsloop I read about cross-validation-training to avoid overfitting and implemented it.
My loop looks ...
-1
votes
0
answers
19
views
Prediction error from CNN: Giving same predictions for all test inputs
I have been training the ICBHI 2017 dataset using CNN. This was done by converting the audio files (lung audio data) into STFT and MFCC. These features were fused (and of course padded to avoid any ...
0
votes
1
answer
26
views
Why is my output predicting the same label using pretrained Alexnet in pytorch?
I'm attempting to use a pretrained alexnet model for CIFAR10 dataset however it always predicts everything as the same class. I use the exact same code except using alexnet untrained and it works as ...
0
votes
0
answers
9
views
the list of Numpy arrays you are passing to your model is not the size model expects. Expected to see 3 arrays but got the following list of 1 arrays:
I am trying to do transfer learning on Mask RCNN. I get this error when I try to run model fit generator.
The input shapes of my dataset are-
print(x_train.shape)
print(y_train.shape)
print(x_test....
0
votes
0
answers
13
views
Loss increasing and accuracy going down when finetuning LayoutLM
I'm trying to finetune LayoutLM V3 Base model using the provided dit/train_net.py script on my own custom dataset that is similar to PubLayNet. The learning starts well but after reaching the first ...
0
votes
0
answers
6
views
Backtracking filter coefficients of Convolutional Neural Networks
I'm starting to learn how convolutional neural networks work, and I have a question regarding the filters. Apparently, these are randomly generated when the model is generated, and then as the data is ...
0
votes
0
answers
17
views
error with input for cnn in keras: ValueError: Failed to find data adapter
i am trying to build a simple cnn.
i had some dataset of sentences and i converted them to a arrays of numbers using doc2vec.
now i am trying to input the vectors to the model and get :
ValueError: ...
0
votes
0
answers
9
views
Need help about my Connect 4 Deep Reinforcement Learning Agent
Here is my code
My env setting
state: np.array, 1 * 6 * 7 (1 input channel for CNN, 6 * 7 the size of the board), 0 = nothing, 1 = agent1's token, -1 =
agent2's token
reward function: 0 if draw or ...
0
votes
0
answers
25
views
Model was constructed with shape (None, 48, 48, 1) for input KerasTensor but was called on an input with incompatible shape (None,)
update the data (image) and ages lists, respectively
img_data.append(gray_image)
split_var = file.split('_')
ages.append(split_var[0])
targets.append(...
1
vote
1
answer
44
views
RuntimeError: tf.gradients is not supported when eager execution is enabled. Use tf.GradientTape instead
Hi I was trying to reproduce results from this link
Keras CNN Chexpert
and I encounter this error RuntimeError: tf.gradients is not supported when eager execution is enabled. Use tf.GradientTape ...
-1
votes
1
answer
29
views
Unable to download CIFAR-10 dataset
I am attempting to run a GoogLeNet code, but when I run it, for some reason it says
[INFO] loading CIFAR-10 data...
[INFO] compiling model..
but when my friend runs the same code, his shows
[INFO] ...
1
vote
1
answer
28
views
I am getting "Failed precondition" error message
I am attempting to run a GoogLeNet code, but when I run the following via the terminal:
python.exe googlenet_cifar10.py --model output/minigooglenet_cifar10.hdf5 --output output
I am new to python, ...
0
votes
0
answers
9
views
The NN Input Shape for a game of Snake
I am writing a DQN for the game of snake. Currently my neural network works using a input shape of
(12,) with the 12 binary values representing: Food Up,Down,Left,Right . Danger Up,Down,Left,Right ...
0
votes
0
answers
16
views
Pytorch lightning validation set has different image sizes than training set
When i try to train a cnn, I get different shapes for the same dataloader and i dont know why. This is the output of the shapes I feed into the model:
You can see that my validation shape is [batch ...
0
votes
0
answers
21
views
How to get the latent vector as an output from a cnn model before training to the fully connected layer?
I am working on CNN model using Tensorflow frames in google collab. I am unable to extract the latent vectors from the convolutional layers. I want to extract the output of the convolutional layers, ...
-2
votes
0
answers
6
views
What should I do if I want my output will be between 0-2 in CNN (more than 2 class)?
model.add(Dense(units=4, activation="relu"))
model.add(Dense(units=3, activation="sigmoid"))func.
adam = Adam(learning_rate=0.01)
model.compile(optimizer=adam, loss ='...
0
votes
1
answer
38
views
AttributeError: module 'keras.api._v2.keras.metrics' has no attribute 'auc'
I am running this particular notebook from this link Chexpert Keras CNN, which is training cnn model on the chexpert dataset and with keras library.
However I am getting this particular error when I ...
0
votes
0
answers
9
views
Image datasets in a the pascal format
I'm working on a line detection project using deep learning, and I'm just wondering the benefits of using an image dataset in a pascal format ?
0
votes
0
answers
24
views
How to copy the neural network in papers for benchmark experiments?(GAN model)
I want to change the model below:
https://github.com/w86763777/pytorch-gan-collections/blob/master/source/models/dcgan.py
And I want to test the model below:
So I have to change the code to match the ...
-1
votes
0
answers
15
views
Keras CNN accuracy pretrained on imagenet lower than without [closed]
I'm doing CNN experiments for classification of custom datasets. I test models with and without ImageNet weights to test the effects of transfer-learning. I am consistently seeing classification ...
0
votes
1
answer
28
views
3 Classes prediction CNN Deep Learning
I trained my model in three classes and now I want to input one image at a time to see whether it belongs to classes 1,2, or 3.
data = []
img_size = 224
for i in categories:
path = os.path.join(...
0
votes
1
answer
24
views
pytorch: simple recurrent neural network for image classification
I am making a simple recurrent neural network architecture for CIFAR10 image classification. I am not interested not use pre-defined RNN class in PyTorch because i am implementing from scratch ...
0
votes
0
answers
41
views
CNN Low test Accuracy
I am building a CNN model to classify images into 11 classes as follows: 'dew','fogsmog','frost','glaze','hail','lightning','rain','rainbow','rime','sandstorm','snow'
and while training I get good ...
0
votes
0
answers
17
views
Failure to use ml5.js image classification model-Error: Based on the provided shape, [1,64,64,4], the tensor should have 16384 values but has 20155392
I trained an image classification neural network model written in ml5.js. When I try to use the model files in a p5.js web editor, I get an error 'Based on the provided shape, [1,64,64,4], the tensor ...
0
votes
0
answers
17
views
is convolution kernel size of 1 meaningful?
I have time series data of 32x32 size and I used sliding window to form a 3d array of timestepsx32x32. So my input are shape of (batchsize x timesteps x 32 x 32)
I tried a (1,3,3) conv3d filter and a (...
0
votes
0
answers
42
views
Built-in RNN model was constructed with a wrong shape in Virtual Donkey
I use Donkey Simulator to train and test a built-in recurrent neural network model with my own data, but the shape of the model and the shape of the input do not match. They don't have the same rank.
...
0
votes
0
answers
9
views
Get 'function' object has no attribute 'loss' when applying GridsearchCV
I want to try GridsearchCV on my model, my import is :
enter image description here
my code is:
enter image description here
enter image description here
The error i get:
enter image description here
1
vote
1
answer
30
views
Adding a new column to the table in Python
I want to make a table that summarizes the result of my grid search. I wrote the code below. To show just different configurations, the table works fine. But I want to add a new column that shows the ...