Tf.nn.dropout () Introduction

Source: Internet
Author: User
1.Dropout principle Brief:

Dropout is randomly throwing away a subset of neurons during different training sessions. That is, the activation value of a certain neuron with a certain probability p, let it stop working, this training process does not update the weights, also do not participate in the calculation of neural networks. But its weight has to be preserved (just temporarily not updated) because it may have to work again the next time the sample is entered. As follows:


But in testing and validation: each neuron participates in the operation, but its output is multiplied by the probability p.

2, Tf.nn.dropout (x,keep_prob,noise_shape=none,seed=none,name=none) function description

The previous two parameters are commonly used in the above methods:

The first parameter x: refers to the input

The second parameter keep_prob: sets the probability that the neuron is selected, Keep_prob is a placeholder at initialization, Keep_prob = Tf.placeholder (Tf.float32). TensorFlow set Keep_prob specific values at run, such as keep_prob:0.5

The third parameter, Noise_shape: A 1-dimensional int32 tensor, represents a shape that randomly generates a "hold/Discard" flag

Seed: Shaping variable, random number seed

Name: no practical use.

Summary: Dropout () function is to make some elements in the tensor into 0, the other unchanged 0 of the elements into the original 1/keep_prob size.

Tf.nn.dropout () Introduction

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.