本文共 1467 字,大约阅读时间需要 4 分钟。
Objective-C??BP???????
????????Objective-C??BP??????????????????????????????????????????????????????????????????????????????
??????
?????????
??????????? ??????6???????ReLU????? ??????10?????????????? ??????
????????????????????? ???????????????????????????[a = W_{in}x + b]???(W_{in}) ????????(b) ????(x) ?????? ???????ReLU?????????????? (a)? ???????????????????????????????[y = W_{out}a + b_{out}]???(W_{out}) ????????(b_{out}) ??????? ????????????????????? ??????
????????????????????????????????????[L = \frac{1}{N}\sum_{i=1}^{N}(y_i - y_{??})^2]???(N) ?????? ??????????????????????????????????????????[\Delta a = (W_{out})^T \Delta y]???(\Delta y) ?????????? ?????????????????????????????????????[W = W - \eta \Delta W]???(\eta) ????? ?????????????????????[b = b - \eta \Delta b] ????
????????????????????? ?????????????????????????? ????????????????????????? ?????????????????????????? ????
#import #import @interface NeuralNetwork : NSObject@property (nonatomic, strong) NSArray *inputData;@property (nonatomic, strong) NSArray *hiddenLayer;@property (nonatomic, strong) NSArray *outputData;- (id)initWithInputData:(NSArray *)inputData;- (NSArray *)forwardPropagate;- (NSArray *)backwardPropagate;- (void)updateWeightsWithLearningRate:(float)learningRate;@end
?????
????????????BP?????????????
????????????sigmoid????? ????????Dropout???????? ????????????????????? ????????Adam?SGD??????????????? ????????????????BP??????????????????????
转载地址:http://jcnfk.baihongyu.com/