neural-network

Why is binary_crossentropy more accurate than categorical_crossentropy for multiclass classification in Keras?

若如初见. 提交于 2019-12-17 18:37:38
问题 I'm learning how to create convolutional neural networks using Keras. I'm trying to get a high accuracy for the MNIST dataset. Apparently categorical_crossentropy is for more than 2 classes and binary_crossentropy is for 2 classes. Since there are 10 digits, I should be using categorical_crossentropy . However, after training and testing dozens of models, binary_crossentropy consistently outperforms categorical_crossentropy significantly. On Kaggle, I got 99+% accuracy using binary

How does a back-propagation training algorithm work?

瘦欲@ 提交于 2019-12-17 18:03:34
问题 I've been trying to learn how back-propagation works with neural networks, but yet to find a good explanation from a less technical aspect. How does back-propagation work? How does it learn from a training dataset provided? I will have to code this, but until then I need to gain a stronger understanding of it. 回答1: Back-propagation works in a logic very similar to that of feed-forward . The difference is the direction of data flow. In the feed-forward step, you have the inputs and the output

caffe with multi-label images

丶灬走出姿态 提交于 2019-12-17 17:56:11
问题 I have a dataset of images that have multiple labels; There are 100 classes in the dataset, and each image has 1 to 5 labels associated with them. I'm following the instruction in the following URL: https://github.com/BVLC/caffe/issues/550 It says that I need to generate a text file listing the images and its labels as in /home/my_test_dir/picture-foo.jpg 0 /home/my_test_dir/picture-foo1.jpg 1 In my case, since I have multi-label images, does it work to simply add labels as in following?

What are advantages of Artificial Neural Networks over Support Vector Machines? [closed]

左心房为你撑大大i 提交于 2019-12-17 17:23:20
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . ANN (Artificial Neural Networks) and SVM (Support Vector Machines) are two popular strategies for supervised machine learning and

TensorFlow: How to handle void labeled data in image segmentation?

你离开我真会死。 提交于 2019-12-17 16:32:33
问题 I was wondering how to handle not labeled parts of an image in image segmentation using TensorFlow. For example, my input is an image of height * width * channels. The labels are too of the size height * width, with one label for every pixel. Some parts of the image are annotated, other parts are not. I would wish that those parts have no influence on the gradient computation whatsoever. Furthermore, I am not interested in the network predicting this “void” label. Is there a label or a

How can I hot one encode in Matlab? [duplicate]

回眸只為那壹抹淺笑 提交于 2019-12-17 16:11:33
问题 This question already has answers here : Create a zero-filled 2D array with ones at positions indexed by a vector (4 answers) Closed 2 years ago . Often you are given a vector of integer values representing your labels (aka classes), for example [2; 1; 3; 3; 2] and you would like to hot one encode this vector, such that each value is represented by a 1 in the column indicated by the value in each row of the labels vector, for example [0 1 0; 1 0 0; 0 0 1; 0 0 1; 0 1 0] 回答1: For speed and

Multiple category classification in Caffe

雨燕双飞 提交于 2019-12-17 15:59:06
问题 I thought we might be able to compile a Caffeinated description of some methods of performing multiple category classification . By multi category classification I mean: The input data containing representations of multiple model output categories and/or simply being classifiable under multiple model output categories. E.g. An image containing a cat & dog would output (ideally) ~1 for both the cat & dog prediction categories and ~0 for all others. Based on this paper, this stale and closed PR

How to convert the output of an artificial neural network into probabilities?

蓝咒 提交于 2019-12-17 15:16:41
问题 I've read about neural network a little while ago and I understand how an ANN (especially a multilayer perceptron that learns via backpropagation) can learn to classify an event as true or false. I think there are two ways : 1) You get one output neuron. It it's value is > 0.5 the events is likely true, if it's value is <=0.5 the event is likely to be false. 2) You get two output neurons, if the value of the first is > than the value of the second the event is likely true and vice versa. In

Why use softmax as opposed to standard normalization?

我的未来我决定 提交于 2019-12-17 15:01:12
问题 In the output layer of a neural network, it is typical to use the softmax function to approximate a probability distribution: This is expensive to compute because of the exponents. Why not simply perform a Z transform so that all outputs are positive, and then normalise just by dividing all outputs by the sum of all outputs? 回答1: There is one nice attribute of Softmax as compared with standard normalisation. It react to low stimulation (think blurry image) of your neural net with rather

Is deep learning bad at fitting simple non linear functions outside training scope (extrapolating)?

不羁岁月 提交于 2019-12-17 12:37:35
问题 I am trying to create a simple deep-learning based model to predict y=x**2 But looks like deep learning is not able to learn the general function outside the scope of its training set . Intuitively I can think that neural network might not be able to fit y=x**2 as there is no multiplication involved between the inputs. Please note I am not asking how to create a model to fit x**2 . I have already achieved that. I want to know the answers to following questions: Is my analysis correct? If the