tailieunhanh - Mạng thần kinh nhân tạo cho phân lớp màu sắc part 6

Dùng hệ thống xác định bằng các trọng số chứa trong " " áp dụng trên ảnh "" 3. Lập lại chương trình dùng thuật toán Davidon - Fletcher - Powell để thay thế . Lưu lại chương trình vào file . 4. Kiểm tra trên . Quá trình nhận biết Thật không rõ ràng lắm là tại sao sự nhận biết lại chiếm một vị trí quan trọng trong mối quan tâm của con người. | EPS do EPS tol1 EPS while tol1 EPS float sqrt double EPS df float malloc N sizeof float dfp float malloc N sizeof float S float malloc N sizeof float xt float malloc N sizeof float dfun x df N for i 0 i N i S i df i gotoxy 1 6 q fun x printf Initial value of error function f q iter 0 while iter no_iter if kbhit 0 if getch ESC return iter test convergence. test for i 0 i N i test float fabs float df i if test eps1 printf nConvergence by gradient test. break If df S restart. test for i 0 i N i 310 if df i S i test break if test for i 0 i N i S i df i Save previous gradient vector. for i 0 i N j dfp i df i Line Search. bracket a b fun x xt S N astar Brent a b fun eps2 x xt S N Adjust variables. for i 0 i N i x i - astar S i dfun x df N sum1 for i 0 i N i sum1 dfp i dfp i sum2 df i df i sum sum2 sum1 for i 0 i N i S i sum S i df i q fun x gotoxy 1 7 printf Error function f at iteration -5d q iter printf nNumber of iterations d n iter free S free xt Function evaluation for line search. 311 float f float alpha float fun float float x float xt float S int N int i float q for i 0 i N i xt i x i -alpha S i q fun xt return q Function to bracket the minimum of a single variable function. void bracketfloat ax float dx float a float b float fun float float x float xt float s int N float y1 x1 x0 y0 x2 y2 int iter x0 ax x1 x0 dx y0 f x0 fun x xt s N y1 f x1 fun x xt s N rf y1 y0 dx -dx x1 x0 dx y1 f x1 fun x xt s N dx dx x2 x1 dx y2 f x2 fun x xt s N iter 0 while y2 y1 .

TỪ KHÓA LIÊN QUAN