Questions tagged [convolutional-neural-network]

A convolutional neural network is a form of neural network with an additional convolutional layer, typically used in image & audio analysis. The convolutional layer is essentially a filtering stage defined by the kernel which is used. For example, a convolutional layer could have a kernel which extracts edges from an image towards the goal of learning which objects are in a scene.

Filter by
Sorted by
Tagged with
0 votes
0 answers
16 views

Fast Fourier Transform in computer vision

Can someone explain me how does FFT works in computer vision, please. I know something about FFT as an algorithm of competitive programming but I can't understand how it perform an image in computer ...
  • 101
0 votes
0 answers
9 views

Training and Validation accuracy decreases after using more data

I have a binary classification project, I use a neural network with the following architecture: The shape of the input is 64×64×4. This input was fed to a Conv2D layer with 32(5×5) filters followed by ...
0 votes
0 answers
11 views

Siamese Neural network inputs

A currently task involves the classification of bacteria as antibiotic susceptible and antibiotic resistant. I have 4 data sets: treated resistant, treated susceptible, untreated resistant and ...
0 votes
0 answers
8 views

In "Show, attend and tell", why do the attention weights get multiplied with the features to form the context vector?

The attention weights are formed through the last hidden state of the LSTM and the feature map from some kind of image encoder (in my case resnet so the features are in the form of 14x14x2048). They ...
  • 101
0 votes
1 answer
107 views

Pytorch mat1 and mat2 shapes cannot be multiplied

The error message shows RuntimeError: mat1 and mat2 shapes cannot be multiplied (32x32768 and 512x256) I have built the following model: ...
  • 27
0 votes
0 answers
15 views

Main Features of Convolutional Neural Network

The design of CNN architectures in recent years focuses on how to implement attention mechanism, features an aggregation (sum, addition, and multiplication), as well as receptive field enhancement. ...
  • 231
0 votes
0 answers
4 views

Is a conv transpose layer equivalent to a padding layer and regular conv layer

Is a 2d convolution transpose layer equivalent to a upsampling layer that inserts 0s between rows and columns, then a regular 2d convolution layer? If so, why is it usually not implemented as such (i....
  • 101
0 votes
0 answers
7 views

Batchnorm and gradient attenuation

Am I understood right that if we put batchnorm layer after every conv layer and our network is very deep, then we won't have a problem of gradient attenuation? In other words, is it true that ...
  • 101
0 votes
0 answers
10 views

Can I use zero-padded input and output layers in a 1D convnet to predict an element of interest from a variable-length input sequence?

I have developed a small encoding algorithm that accepts a time series of n = 750 samples and m = 1 feature from a scientific instrument, and encodes/transforms it into a new ordered sequence with an ...
  • 133
0 votes
0 answers
11 views

How to shape the input for Temporal Convolutional Networks

Consider a normal time series coming from stock prices, assume for simplicity it's several thousand data points. So basically I have a time series of prices $\{x_i\}_{i=0}^n$ of $n$ data points. I ...
  • 101
0 votes
0 answers
19 views

Getting bad accuracy of classification using Keras VGG-16

I am very new to the data science domain and directly jumped to TensorFlow models. I've worked on examples provided on the website before. My first time doing any project using it. I am building an ...
  • 1
0 votes
0 answers
12 views

CNN sharing weights in feature map

what do they mean when they say all neurons in a channel share weights with one another? Do they mean that in a chanel or a featue map the weights are the same ?
0 votes
0 answers
41 views

Getting Error: TypeError: cross_entropy_loss(): argument 'target' (position 2) must be Tensor, not tuple

I am working on a CNN multi-class classification of different concentrations (10uM, 30uM, etc.) I create my dataset to include the images as the features and the concentrations as labels. Note that ...
0 votes
2 answers
32 views

Transpose Convolution Output Size

I have been learning GAN (Generative Adversarial Networks) lately and having a hard time understanding the output size for transpose convolution. Let's say I am using a Tensor of [1, 64, 1, 1] as an ...
  • 27
1 vote
1 answer
22 views

Visualizing convolutional neural networks embedding

In this article, the author creates a graph (at the end of the post) from the embeddings of different words found by transformer model. I would like to do a similar thing for a convolutional neural ...
  • 113
0 votes
0 answers
10 views

Ground truth as a function of weights in Keras

I have a convolutional neural network that takes an image an outputs a value between -1 and 1. If the image is an array $I$, and the network transforms the array such that $\text{output} = f(I) \in [-...
1 vote
1 answer
37 views

S-Shaped Learning Curve

For a model that I'm currently testing, I get an S-Shaped curve when plotting the MAE over consecutive epochs, as shown in the image below. I was curious if this indicates a problem with the model or ...
0 votes
0 answers
30 views

Regularization in CNN change training accuracy but not validation accuracy

I have a question regarding regularization in convolutional neural networks. So I'm building a CNN for image classification and I've come across something I don't understand. Without using any ...
0 votes
0 answers
16 views

Data augmentation layer based on physical model for time series data

I am quite new to the Keras API, so forgive me if I use incorrect terminology and for my lack of knowledge about the API. This is for a mathematical (wave modelling) research project and I am quite ...
-1 votes
1 answer
82 views

Manual computation of the predictions in a convolutional neural network

I am trying to manually compute the predictions of the Keras library for a convolutional neural network. However, I am struggling a lot to match my final result with the ones provided by Keras. I do ...
  • 59
0 votes
0 answers
19 views

Tensorflow: ShuffleNetV2 Implementation

I'm trying to implement shufflenetv2 model by using tensorflow and keras, using the following code down below: ...
  • 101
1 vote
1 answer
43 views

Is it possible to reverse the layers of a convolutional neural network?

From my understanding typically a convolutional neural network has a matrix (e.g. an image) as input and output is either an integer or a vector of integers in regression and in classification a ...
  • 11
0 votes
1 answer
9 views

Bad performance with CNN for basic image classification task

how are you doing? I'm playing around with CNN in FastAI. My model with 2 millions parameters only has around 80% accuracy. I also tried with Data normalization, Batch normalization, Label smoothing, ...
0 votes
0 answers
14 views

Problem with tensor shape when implementing triplet loss function for my model in Tensorflow

I picked up the idea of triplet loss and global orthogonal regularization from this paper http://cs230.stanford.edu/projects_fall_2019/reports/26251543.pdf. However, I keep getting caught up in an ...
  • 1
1 vote
2 answers
113 views

Should a CNN generalize to arbitrary positions in the data?

I have trained a CNN on one dimensional data that is the power spectral density (PSD) of a $N$ different classes of signals ($N=4$). Each of the $N$ signals has a different spectral shape (not shown ...
0 votes
1 answer
21 views

Python dataset normalization for convolutional autoencoder

I have a csv files which contain pixel neighboorhood information. Here an example of the dataset: ...
0 votes
0 answers
19 views

Plateaus training loss but validation loss decreases

I am training a fully convolutional regressor, with mobilenet as its backbone. I have already overcome a massive overfitting problem by augmenting the data. However, the training loss seems to be ...
0 votes
0 answers
15 views

Understanding the Pulse Extractor in this paper

I'm reading this paper about a neural vocoder for singing synthesis: https://arxiv.org/pdf/2210.12740.pdf I've implemented vocoders before, but this one discusses a novel pulse extractor: T[i] is ...
  • 101
0 votes
0 answers
39 views

BatchNormalization not working as expected in a 1D convolutional net

I'm trying to make a neural net and have problems with normalization of the values of the hidden layers. I've tried using a BatchNormalization layer to fix this, but I must be doing something wrong ...
  • 21
1 vote
0 answers
22 views

Python train convolutional on numerical values shape issue

I want to train a convolutional neural network autoencoder on a csv file which contains values pixel neighborhood position of an original image of 1024x1024. When I try to train it, I have the ...
0 votes
0 answers
637 views

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

I am following this keras example with my own dataset, which has 3 classes. I load the images using ...
  • 101
0 votes
1 answer
22 views

Predict the values of variable features over timestamps

HI i am having a dataset which contain timestamps and number of users at that timestamp. Each user has resource values which change per timestamp. How can i make predictions of number of users ...
0 votes
0 answers
19 views

Which combination would be more beneficial : Resnet-50 and SVM or Resnet-18 and GANs?

I'm trying to compare the two methods that were used for COVID-19 detection. Given that both these methods have approximately the same accuracies which method according to you would be more beneficial(...
0 votes
0 answers
8 views

How to select best kernel_size and max_pool_size in CNN1D

I have data with shape size 1,89. setup kernel_size = 3 and pool_size = 2 on the conv1d layer. However, the model is not able to predict the peak well. i think the problem is because the kernel_size ...
0 votes
1 answer
44 views

Matching nodes in two directed graphs

How to match a node of graph X with the same node in graph G if: Every node has only one feature: text string, and Nodes in different graphs are considered to be equal if: ...
  • 275
1 vote
0 answers
29 views

Why is my segmentation model not returning a heat map?

I have implemented two CNN architectures to perform segmentations on medical images: the classic UNet and a modified version called the Attention UNet. I have been training the models on roughly 50,...
  • 11
0 votes
0 answers
24 views

Multiple Images as input for Tensorflow VGG16, and how can it be realized

So I am trying to vgg16 as a feature extractor for my set of Partial Angle CT reconstructions(so each set of reconstructions contains 22 individual grayscale images(128,128) that I reshaped into a (...
  • 1
0 votes
0 answers
16 views

Can you use shap. to get importance score for learned (CNN) filters

It is possible to get the "importance" scores for intermediate features (not direct input components) of a trained model using SHAP tools: https://shap.readthedocs.io/en/latest/. From I can ...
0 votes
0 answers
24 views

Image Classification task with unevenly sized tiled images

I'm using a Tensorflow CNN in Python for Image Classification. My data consists of huge images that necessitate splitting into smaller tiles. However, the number of tiles differs per image as the ...
0 votes
0 answers
29 views

How to best train a CNN with longitude/latitude output

Problem I am new to CNNs and I'm starting off with a geolocation problem where the input is an image and the output should be a longitude value and a latitude value. I am unsure of the best way to ...
0 votes
0 answers
28 views

Is zero centering done based on the mean of a single image or of all images?

I have a set of training images and a set of testing images. How exactly should I do zero centering in pre-processing? I have the following questions regarding this: Should I subtract the mean of ...
0 votes
0 answers
71 views

Difference between CNN filter and channel pruning

I've been reading up on DNN pruning techniques and came across filter pruning and channel pruning in CNNs. However, as was my understanding, confirmed by this paper: Pruning a filter in layer $i$ is ...
  • 101
0 votes
0 answers
19 views

Getting matrix multiplication error when running inference on a Pytorch model(LeNet) using MNIST data

I have successfully trained the Pytorch LeNet model on the MNIST data, but have a probelm when running inference on single images. Below is my model architecture: ...
1 vote
1 answer
33 views

Training a CNN in production on new data

How should I approach training a convolutional neural network in production on new data when I detect model performance degradation due to data or concept drift? Resources like this one and this one ...
0 votes
0 answers
40 views

Implementing XGBoost with CNN

I am trying to implement XGBoost as a classifier for a pre-trained CNN. The model produces an F1 score of 93, however, when classifying with XGBoost (or with SVM), the F1 drops to 33. It seems to be ...
  • 1
0 votes
0 answers
23 views

Why is there such a difference in final accuracy between 700x700 px image and the same split up into 140x140 px in TensorFlow

I have a relatively simple TF script for a convolutional neural network to classify microscopy images good or bad - manually this is done via the clarity of the image with bad images appearing blurry. ...
  • 1
0 votes
0 answers
867 views

` TypeError: int() argument must be a string, a bytes-like object or a number ` raised when fitting a multi input Keras model

I'm currently building a U-net model handling multiple input streams of data with Keras/Tensorflow's Functional API. Even though my model compiles, it raises a TypeError when I try to fit it. This ...
0 votes
1 answer
33 views

Strange results from CNN in Keras

I have a binary classification problem. I designed a model with convolution kernels in first layers and then dense layers. As the output layer, however, I used a softmax layer with size 2, and then ...
  • 43
0 votes
3 answers
110 views

Why is resizing images is important when applying CNN or deep learning models?

I have images from deep sea, some are good quality and some barely anything is visible I want to classify the images (they're already labelled) I performed few image enhancement tested it on few ...
0 votes
1 answer
76 views

Model does not learn when using Keras 'flow_from_directory', but learns fine with 'image_dataset_from_directory'?

When classifying images with Keras, I am able to achieve a validation accuracy around 90-95%, however, I am trying to improve with the use of augmentation so have switched from ...
  • 1

1
2 3 4 5
15