kayhman / SmartLinearReg

0 stars 0 forks source link

autodiff.py #1

Open fredocube opened 6 years ago

fredocube commented 6 years ago

Hello, i have an issue with autodiff.py could you help me please ?

Fred ps : this is my first issue, i don't know very well the "bonnes pratiques"

All works expect the last line : newtonSolver(err, grad_err, 0)


Traceback (most recent call last): File "D:\Programs\Python\Python36-32\lib\site-packages\autograd\tracer.py", line 139, in new_box return box_type_mappings[type(value)](value, trace, node) KeyError: <class 'int'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "", line 5, in newtonSolver File "", line 2, in newtonStep File "D:\Programs\Python\Python36-32\lib\site-packages\autograd\wrap_util.py", line 20, in nary_f return unary_operator(unary_f, x, *nary_op_args, **nary_op_kwargs) File "D:\Programs\Python\Python36-32\lib\site-packages\autograd\differential_operators.py", line 24, in grad vjp, ans = _make_vjp(fun, x) File "D:\Programs\Python\Python36-32\lib\site-packages\autograd\core.py", line 10, in make_vjp end_value, end_node = trace(start_node, fun, x) File "D:\Programs\Python\Python36-32\lib\site-packages\autograd\tracer.py", line 9, in trace start_box = new_box(x, t, start_node) File "D:\Programs\Python\Python36-32\lib\site-packages\autograd\tracer.py", line 141, in new_box raise TypeError("Can't differentiate w.r.t. type {}".format(type(value))) TypeError: Can't differentiate w.r.t. type <class 'int'>

kayhman commented 6 years ago

Hello,

Please try with python 2.7.14. Everything should work with this revision.

Regards,

On Wed, Mar 28, 2018 at 7:01 PM, fredocube notifications@github.com wrote:

Hello, i have an issue with autodiff.py could you help me please ?

Fred ps : this is my first issue, i don't know very well the "bonnes pratiques"

All works expect the last line : newtonSolver(err, grad_err, 0)

Traceback (most recent call last): File "D:\Programs\Python\Python36-32\lib\site-packages\autograd\tracer.py", line 139, in new_box return box_type_mappings[type(value)](value, trace, node) KeyError: <class 'int'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "", line 5, in newtonSolver File "", line 2, in newtonStep File "D:\Programs\Python\Python36-32\lib\site-packages\autograd\wrap_util.py", line 20, in nary_f return unary_operator(unary_f, x, *nary_op_args, **nary_op_kwargs) File "D:\Programs\Python\Python36-32\lib\site-packages\autograd\differential_operators.py", line 24, in grad vjp, ans = _make_vjp(fun, x) File "D:\Programs\Python\Python36-32\lib\site-packages\autograd\core.py", line 10, in make_vjp end_value, end_node = trace(start_node, fun, x) File "D:\Programs\Python\Python36-32\lib\site-packages\autograd\tracer.py", line 9, in trace start_box = new_box(x, t, start_node) File "D:\Programs\Python\Python36-32\lib\site-packages\autograd\tracer.py", line 141, in new_box raise TypeError("Can't differentiate w.r.t. type {}".format(type(value))) TypeError: Can't differentiate w.r.t. type <class 'int'>

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kayhman/SmartLinearReg/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AA053hJagJERDbYb62wrEIv1Qv-6wU8oks5ti8HvgaJpZM4S_A05 .

--

Guillaume Saupin, Phd R&D Manager, Data scientist

Energy Performance Insight