autodiff.js:JavaScript 的正向和反向模式自动区分

时间:2021-07-08 08:39:40
【文件属性】:
文件名称:autodiff.js:JavaScript 的正向和反向模式自动区分
文件大小:56KB
文件格式:ZIP
更新时间:2021-07-08 08:39:40
JavaScript AutoDiff.js 使用运算符重写的概念验证正向和反向模式自动分化。 目前要求函数是纯函数,只有对 Math 库函数的外部调用。 function xcubed ( x ) { return Math . pow ( x , 3 ) ; } var dxcubed = AutoDiff . instrument ( xcubed ) ; xcubed ( 4 ) ; // => 64 AutoDiff . forward ( dxcubed , [ 4 ] ) ; // {x: 48} function messy ( x , y , z , w , t ) { return Math . pow ( x , z ) + Math . pow ( y , x - w ) + t / y ; } var dmessy = AutoDiff . instrument ( me
【文件预览】:
autodiff.js-master
----.gitattributes(66B)
----src()
--------tape.js(6KB)
--------instrumenter.js(4KB)
--------autodiff.js(995B)
--------dual.js(3KB)
----example()
--------test.js(3KB)
--------test.html(883B)
----LICENSE(1KB)
----README.md(830B)
----vendor()
--------escodegen.js(103KB)
--------esprima.js(127KB)
--------estraverse.js(21KB)

网友评论