美文网首页
十.Tensorflow反向传播

十.Tensorflow反向传播

作者: 愿风去了 | 来源:发表于2018-11-18 16:30 被阅读11次

    A Regression Example

    We create a regression example as follows. The input data will be 100 random samples from a normal (mean of 1.0, stdev of 0.1). The target will be 100 constant values of 10.0.

    We will fit the regression model: x_data * A = target_values

    Theoretically, we know that A should be equal to 10.0.

    We start by creating the data and targets with their respective placholders

    Classification Example

    For the classification example, we will create an x-sample made of two different normal distribution inputs, Normal(mean = -1, sd = 1) and Normal(mean = 3, sd = 1). For each of these the target will be the class 0 or 1 respectively.

    The model will fit the binary classification: If sigmoid(x+A) < 0.5 then predict class 0, else class 1.

    Theoretically, we know that A should take on the value of the negative average of the two means: -(mean1 + mean2)/2.

    We start by resetting the computational graph:

    相关文章

      网友评论

          本文标题:十.Tensorflow反向传播

          本文链接:https://www.haomeiwen.com/subject/gmwmfqtx.html