Neural Networks: Sigmoid Activation Function for continuous output variable

后端 未结 2 1840
闹比i
闹比i 2021-01-05 18:42

Okay, so I am in the middle of Andrew Ng\'s machine learning course on coursera and would like to adapt the neural network which was completed as part of assignment 4.

2条回答
  •  独厮守ぢ
    2021-01-05 19:14

    If you want to have continuous output try not to use sigmoid activation when computing target value.

    a1 = [ones(m, 1) X];   
    a2 = sigmoid(X * Theta1');  
    a2 = [ones(m, 1) z1];  
    a3 = z1 * Theta2';  
    ht = a3;
    

    Normalize input before using it in nnCostFunction. Everything else remains same.

提交回复
热议问题