Here are my weights between VISIBLE and HIDDEN units
# h : hidden, v : visible ?
gemm!('N', 'T', lr, h_neg, v_neg, 0.0, rbm.dW)
gemm!('N', 'T', lr, h_pos, v_pos, -1.0, rbm.dW)
this is the code for standard weights updating .
now l want to modify this two functions to add L2 regularization . How can l do that efficiently ? any ideas !!
the change to make and to add is between the two functions :
gemm!('N', 'T', lr, h_neg, v_neg, 0.0, rbm.dW)
# l think it's here to do the regularization
gemm!('N', 'T', lr, h_pos, v_pos, -1.0, rbm.dW)
thanks for help l'm dummy with this concepts