Hot answers tagged

34 votes
Accepted

Why do CNN's sometimes make highly confident mistakes, and how can one combat this problem?

The concept you are looking for is called epistemic uncertainty, also known as model uncertainty. You want the model to produce meaningful calibrated probabilities that quantify the real confidence of ...
user avatar
15 votes

Why do CNN's sometimes make highly confident mistakes, and how can one combat this problem?

Your classifier is specifically learning the ways in which 0s are different from other digits, not what it really means for a digit to be a zero. Philosophically, you could say the model appears to ...
user avatar
11 votes
Accepted

Effect of batch size and number of GPUs on model accuracy

This should make a difference, but how big is the difference heavily depends on your task. However, generally speaking, a smaller batch size will have a lower speed if counted in sample/minutes, but ...
user avatar
  • 1,715
9 votes

Can LSTM neural networks be sped up by a GPU?

From Nvidia www (https://developer.nvidia.com/discover/lstm): Accelerating Long Short-Term Memory using GPUs The parallel processing capabilities of GPUs can accelerate the LSTM training and ...
user avatar
7 votes

Why do CNN's sometimes make highly confident mistakes, and how can one combat this problem?

Broken assumptions Generalization relies on making strong assumptions (no free lunch, etc). If you break your assumptions, then you're not going to have a good time. A key assumption of a standard ...
user avatar
  • 853
5 votes
Accepted

Can LSTM neural networks be sped up by a GPU?

I found that there are cuDNN accelerated cells in Keras, for example, https://keras.io/layers/recurrent/#cudnnlstm. They are very fast. The normal LSTM cells are faster on CPU than on GPU.
user avatar
  • 269
5 votes
Accepted

Deep Q-Learning poor convergence on Stochastic Environment

The inputs that you describe seem like they should be sufficient for a DQN-based agent to learn a good strategy for playing Minesweeper, regardless of whether or not the starting layout changes. The ...
user avatar
  • 9,379
4 votes
Accepted

Accuracy too high too fast?

It actually depends on a couple of things here - How many output classes do you have? If you have only 2 or 3 classes, it is a very easy task for the classifier that you have built. So, it is highly ...
user avatar
3 votes
Accepted

How can I prevent the CNN from classifying a new input into one of the existing labels (it was trained with) when the input has a new different label?

You can introduce another class to your network - "not a book". After that, you will need to add new data to your dataset, random images that do not contain books to classify and train your network on ...
user avatar
  • 276
3 votes

How to constraint the output value of a neural network?

There are many ways of constraining the network's output. Using an activation layer is a good one. If you sigmoid the output layer, the output is constrained between [0,1] and you can multiply that by ...
user avatar
3 votes

Will a neural network always predict the correct label if it sees the exact same input during training and testing?

No, Neural Networks do not have such a guarantee. In fact, I don't believe any kind of classifier in the entire field of Machine Learning has such a guarantee, though some may be slipping my mind... ...
user avatar
  • 9,379
3 votes

Adding BERT embeddings in LSTM embedding layer

Instead of using the Embedding() layer directly, you can create a new bertEmbedding() layer and use it instead. ...
user avatar
3 votes

Why would you implement the position-wise feed-forward network of the transformer with convolution layers?

I'm going to post another guess to this question - it won't be a complete answer, but hopefully it'll provide some direction towards finding a more legitimate answer. The feed-forward networks as ...
user avatar
3 votes
Accepted

Is CNN capable of extracting the descriptive statistics features

CNNs learn convolutional filters that get trained on finding local, recurring patterns in some kind of image/volume data. 1D convolution is actually a thing, but I think what would be more suitable ...
user avatar
  • 705
3 votes
Accepted

How to describe an keras Model in a scientific report

Some other details you could mention are: total number of model parameters (e.g. 1.2M or 0.15M) & depth of the network (e.g. 38-layered network) family/style of the network architecture (e.g. ...
user avatar
3 votes

Effect of batch size and number of GPUs on model accuracy

No. Different batch sizes mean different gradients (check stochastic gradient descent concept you will get how loss calculated) are calculated in each step, and thus the gradient descent will likely ...
user avatar
3 votes

Why are traditional ML models still used over deep neural networks?

This question is very broad, so let me attempt to answer it using my own background in time series analysis. As an example, why would I continue using ARIMA to forecast a time series? Why not simply ...
user avatar
3 votes

Why do CNN's sometimes make highly confident mistakes, and how can one combat this problem?

Apollys, That's a very well thought out response. Particularly, the philosophical discussion of the essence of "0-ness." I haven't actually performed this experiment, so caveat emptor... I wonder ...
user avatar
3 votes
Accepted

Is my GRU model under-fitting given this plot of the training and validation loss?

When ever you are buliding a ML Model don't take accuracy seriously(Mistake done by Netflix that cost them alot), you should try to get the hit scores as they will help you to know how many times your ...
user avatar
3 votes
Accepted

Why MLP cannot approximate a closed shape function?

In neural networks, the family of functions and the shapes that they can make for decision surfaces is determined by the activation function you use (in your case, ...
user avatar
  • 23.8k
3 votes
Accepted

What is the need for so many filters in a CNN?

Then how do each filter differ by? Is it in hovering over the input matrix? Or is it in the values contained by filter itself? Or differs in both hovering and content? The filters (aka kernels) are ...
user avatar
  • 33.8k
3 votes
Accepted

Are these book example CNN results realistic?

I was able to run the code without "any" modifications on Tensorflow 2.4.0, just had to replace the imports: ...
user avatar
  • 345
2 votes

Ensemble Learning using Convolutional Neural Networks

I am new to AI but this is something I can think of. There might be other much better ways. Or even functions in scikit learn to do it 1) create a list of all the 22 models 2) iterate over the ...
user avatar
2 votes

Ensemble Learning using Convolutional Neural Networks

I think it is not a very good idea because Im pretty sure you used for learning all these 22 CNN same images and even same way for giving them a batches of images. So basically in a result you would ...
user avatar
2 votes

Using a DQN with a variable amount of Valid Moves per turn for a Board Game

I think instead of: if np.argmax(act_values[0]) in actions_allowed: return np.argmax(act_values[0]) you can use something like: ...
user avatar
  • 2,551
2 votes

Why would giving my AI more data make it perform worse?

Why would giving my AI more data make it perform worse? A lot of possible reasons: In forecasting, you could have a seasonality. If you have it exactly 3 times, then it is good. If you have it 3.5 ...
user avatar
  • 1,007
2 votes

Convolutional Layers on a hexagonal grid in Keras

I had a similar problem with a 2D convolution on a hexagonal grid while working on a diffusion problem and stumbled upon this question. Rather than using cube coordinates, you could use doubled ...
user avatar
2 votes
Accepted

Dice loss gives binary output whereas binary crossentropy produces probability output map

The probability map / output isn't produced by your loss function, but your output layer, which is activated either by softmax or sigmoid. In other words, your dice loss output is also a probability ...
user avatar
  • 36
2 votes

how to benefit from previous training weights in training again to increase accuracy?

First, I assume you've tuned your hyperparameters. Because, instead of re-train the network (use the weights that resulted from the previously training process) that needs more times, I'll invest more ...
user avatar
  • 2,551
2 votes
Accepted

Reinforcement learning to play snake - network seems to not get trained at all

I cannot comment much on your setup for inputs and outputs. It seems adequate to get some control, but does not cover the fully Markov state for the game, so I would expect that will limit the agent ...
user avatar
  • 23.8k

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