Created using Colaboratory
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
"metadata": {
|
||||
"colab": {
|
||||
"provenance": [],
|
||||
"authorship_tag": "ABX9TyMrF4rB2hTKq7XzLuYsURdL",
|
||||
"authorship_tag": "ABX9TyMLKg5ZmXqojcVrZD5BGm9g",
|
||||
"include_colab_link": true
|
||||
},
|
||||
"kernelspec": {
|
||||
@@ -235,7 +235,7 @@
|
||||
"# Finite difference calculation\n",
|
||||
"dydx_fd = (y2-y1)/delta\n",
|
||||
"\n",
|
||||
"print(\"Gradient calculation=%f, Finite difference gradient=%f\"%(dydx,dydx_fd))\n"
|
||||
"print(\"Gradient calculation=%f, Finite difference gradient=%f\"%(dydx.squeeze(),dydx_fd.squeeze()))\n"
|
||||
],
|
||||
"metadata": {
|
||||
"id": "KJpQPVd36Haq"
|
||||
|
||||
Reference in New Issue
Block a user