Hot answers tagged

2 votes
Accepted

Pytorch mat1 and mat2 shapes cannot be multiplied

In forward, the image first passes through some convolutional layers (i.e. self.classifier), then it is flattened, then passed ...
noe's user avatar
  • 25.6k
2 votes

Is deep learning high initial validation accuracy a sign of problem?

It's normal for the validation accuracy to start lower than the training accuracy, especially in the first few epochs. This is because the model is still learning and adjusting its weights to fit the ...
irazza's user avatar
  • 46
2 votes
Accepted

Traditional 2D CNN Formula

You are not missing anything. You are right, the article is mistaken. You can check the renowned CS231N course documentation to check for yourself: https://cs231n.github.io/convolutional-networks/
noe's user avatar
  • 25.6k
2 votes

Implementation of Graph Neural Network for Image Classification

GNNs can be used for image classification and in future may prove to be a better approach, but as of now, CNNs are state-of-the-art. Steps for image classification using GCN: -> Converting the ...
shivani's user avatar
  • 140
2 votes
Accepted

Train CNN weights by using FFT - Reinforcement Learning?

If you're doing this strictly for learning the inner machinery of how a CNN works, then whipping up something in C++ or python or your language of choice is fine, and can be a good learning exercise. ...
brewmaster321's user avatar
2 votes

Deep learning model produces very different results when classifying the same samples

You're facing a reproducibility issue, I think. In the first case (having clear_session and make_model within the loss) you get ...
Luca Anzalone's user avatar
2 votes

What may cause the CNN layer weight regularizer to reduce the model accuracy

In general, I stumbled across voices in literature that we shouldn't use dropout with such a big parameter for shallow networks, as it can violate their capabilities. Example: Piotrowski, A. P., ...
Tomasz Witkowski's user avatar
2 votes

How does ReLU function make it possible to let the CNN learn more complex features in input data?

Before ReLU became popular, the usual activation functions were tanh and sigmoid. These activation functions suffer a problem called "vanishing gradient", which caused the gradient to be ...
noe's user avatar
  • 25.6k
1 vote

Image segmentations vs image detection

It's an interesting question. I don't think there is a definitive "always true" answer. So empirical results would prevail. To me, the biggest factor regarding accuracy would be the type of ...
Valentin Calomme's user avatar
1 vote

Image segmentations vs image detection

Image Segmentation can extract objects from environments now adays after Meta published SAM (SegmentAnything) and even with few-shot learning can perform very well. Recommend using it to set the stage ...
Emad Ezzeldin's user avatar
1 vote

Using a Genetic Algorithm in junction with a digit classifier CNN to create an "MNIST image generator"

When you say "fail to converge", do you mean the loss is not changing, or that the resulting images are bad? If the loss is not changing, something is up with your code. If the loss goes ...
Karl's user avatar
  • 481
1 vote

Building a CNN (with Keras for pixelwise classification)

The last layer should match the dimension of your response. Dense layer can only return 1D whereas conv layers can return 2D., Based on your question, you want to classify all your pixels (binary?) in ...
Max's user avatar
  • 31
1 vote

What does it mean if a neural networks starts overfitting more after applying regularisation techniques

The results seems alright. Your training accuracy could be 99% if trained on enough epochs but it does not mean it is a real indicator on how well it will do on unseen data. Regularization bridges ...
Rathod's user avatar
  • 71
1 vote

Keras CNN early stopping not working as expected with patience parameter in imbalanced datasets

In my view, all happened as it was supposed to. EarlyStopping in the 7th epoch concluded: "The lowest metric was seen 5 epochs ago and the model stopped improving, so let's stop the training&...
Tomasz Witkowski's user avatar
1 vote

Why Relu is correct for CNN?

Welcome to the DataScience stack exchange. ReLu is not "correct" or "incorrect" but it is just one of several popular choices for a nonlinearity in neural networks. It sounds like ...
bogovicj's user avatar
  • 709
1 vote

Converting a Standard LSTM RNN over to a Transformer Model

With a bit of elastic net, dynamic gradient clipping and adjustments to the transformer model build training is progressing nicely now. Here is the build that fixed it: ...
Ted Wilmont's user avatar
1 vote

Adding multi-image context to a CNN

You can perform individual image classification using as input the whole set of related images as well. In order to do this, your initial input will be some 3d array of stacked 256x256 matrices and ...
Giovanni Amorim's user avatar
1 vote

Binary Classification of Images- CNN

Your accuracy function is wrong. y_pred from the model will be a float value between 0 and 1, while y_true is an integer value 0 ...
Karl's user avatar
  • 481
1 vote
Accepted

Looking for suggestions on the model/algorithm for 2D row labeling

Is the number of rows fixed or variable? Can the row predictions be made independently or do they require information from other rows? If predictions are independent, you could take your input image ...
Karl's user avatar
  • 481
1 vote

What Deep Learning model to use in this spectroscopy task?

I think you need a deep learning model that can perform both image segmentation and image classification. Image segmentation is the process of dividing an image into regions or pixels that share some ...
Halis Yılboğa's user avatar
1 vote

Dropout and BatchNorm decrease speed of learning

Dropout is a regularization technique, used to prevent overfitting. It would not improve the accuracy if the network is shallow or of correct size for the dataset, it will rather rather hurt ...
shivani's user avatar
  • 140
1 vote
Accepted

Dropout and BatchNorm decrease speed of learning

Dropout is a regularization technique used to prevent overfitting by dropping some ratio of units of the neural network and on the other hand BatchNorm is used to normalize the units of each batch. ...
Chiho's user avatar
  • 26
1 vote
Accepted

Better results when adding a dropout layer before a single layer classifier - counter intuitive result

The general idea of Dropout is indeed to set the outputs of some layer to zero with a given probability. However, if you place the dropout layer before the classifier (i.e. after the base model), the ...
Mr Tsjolder from codidact's user avatar
1 vote

Why apply min-max normalization to each individual mel spectrogram for a training set?

Local normalization is commonly done in time series classification (TSC) tasks - not just for audio classification. But it may not be appropriate for every TSC task. The purpose is to remove ...
Lynn's user avatar
  • 1,274
1 vote
Accepted

ReLu layer in CNN (RGB Image)

You should put ReLU as the activation of the convolution layers. ReLU is not applied to the RGB values, but to the matrix obtained by convolving the image, also called the filter.
Iya Lee's user avatar
  • 152
1 vote
Accepted

Determining "filters" dimension after a convolution operation

In the complete figure 3, you can get the clues to understand the missing pieces: There, you can see that the figure only shows some of the intermediate results from the total of 24 convolutional ...
noe's user avatar
  • 25.6k
1 vote

CNN model with images - 100% accuracy on validation and test sets with limited data?

Taking 207 images made from 7 videos, and then randomly forming train and validation sets can lead to a massive data leakage: both train and validation sets will have many images from every video. For ...
Valentas's user avatar
  • 1,209
1 vote

Preventing fitting Regression CNN to the mean when dataset has only few outliers

I think your model is behaving as it should. If you need to be particularly sensitive to the possibility out extreme points, then any time your model makes a prediction sufficiently far away from the ...
Dave's user avatar
  • 3,688

Only top scored, non community-wiki answers of a minimum length are eligible