56,050 questions
972
votes
18
answers
472k
views
What is the role of the bias in neural networks? [closed]
I'm aware of the gradient descent and the back-propagation algorithm. What I don't get is: when is using a bias important and how do you use it?
For example, when mapping the AND function, when I use ...
666
votes
13
answers
285k
views
What is the difference between a generative and a discriminative algorithm? [closed]
What is the difference between a generative and a
discriminative algorithm?
577
votes
5
answers
380k
views
A simple explanation of Naive Bayes Classification [closed]
I am finding it hard to understand the process of Naive Bayes, and I was wondering if someone could explain it with a simple step by step process in English. I understand it takes comparisons by times ...
486
votes
14
answers
282k
views
Epoch vs Iteration when training neural networks [closed]
What is the difference between epoch and iteration when training a multi-layer perceptron?
486
votes
9
answers
263k
views
What are logits? What is the difference between softmax and softmax_cross_entropy_with_logits?
In the tensorflow API docs they use a keyword called logits. What is it? A lot of methods are written like:
tf.nn.softmax(logits, name=None)
If logits is just a generic Tensor input, why is it named ...
470
votes
18
answers
104k
views
How does the Google "Did you mean?" Algorithm work? [closed]
I've been developing an internal website for a portfolio management tool. There is a lot of text data, company names etc. I've been really impressed with some search engines ability to very quickly ...
462
votes
10
answers
308k
views
What is the meaning of the word logits in TensorFlow? [duplicate]
In the following TensorFlow function, we must feed the activation of artificial neurons in the final layer. That I understand. But I don't understand why it is called logits? Isn't that a mathematical ...
395
votes
6
answers
132k
views
What are advantages of Artificial Neural Networks over Support Vector Machines? [closed]
Artificial neural networks (ANNs) and support vector machines (SVMs) are two popular strategies for supervised machine learning and classification. It's not often clear which method is better for a ...
357
votes
24
answers
355k
views
Convert array of indices to one-hot encoded array in NumPy
Given a 1D array of indices:
a = array([1, 0, 3])
I want to one-hot encode this as a 2D array:
b = array([[0,1,0,0], [1,0,0,0], [0,0,0,1]])
352
votes
11
answers
485k
views
How do I print the model summary in PyTorch?
How do I print the summary of a model in PyTorch like what model.summary() does in Keras:
Model Summary:
...
349
votes
9
answers
278k
views
What does `view()` do in PyTorch?
What does view() do to the tensor x? What do negative values mean?
x = x.view(-1, 16 * 5 * 5)
315
votes
24
answers
454k
views
How to implement the Softmax function in Python?
From the Udacity's deep learning class, the softmax of y_i is simply the exponential divided by the sum of exponential of the whole Y vector:
Where S(y_i) is the softmax function of y_i and e is the ...
295
votes
5
answers
347k
views
What does model.eval() do in pytorch?
When should I use .eval()? I understand it is supposed to allow me to "evaluate my model". How do I turn it back off for training?
Example training code using .eval().
294
votes
27
answers
177k
views
What is the difference between supervised learning and unsupervised learning? [closed]
In terms of artificial intelligence and machine learning, what is the difference between supervised and unsupervised learning?
Can you provide a basic, easy explanation with an example?
281
votes
15
answers
302k
views
What is the difference between linear regression and logistic regression? [closed]
When we have to predict the value of a categorical (or discrete) outcome we use logistic regression. I believe we use linear regression to also predict the value of an outcome given the input values.
...