Traceback (most recent call last):


 "main.py", line 244, in <module>

train()


 "main.py", line 208, in train

loss.backward()


 "/opt/conda/lib/python3.6/site-packages/torch/autograd/variable.py", line 167, in backward

torch.autograd.backward(self, gradient, retain_graph, create_graph, retain_variables)


 "/opt/conda/lib/python3.6/site-packages/torch/autograd/__init__.py", line 99, in backward

variables, grad_variables, retain_graph)
RuntimeError: invalid argument 3: Index tensor must have same dimensions as input tensor at /opt/conda/conda-bld/pytorch_1518243271935/work/torch/lib/THC/generic/THCTensorScatterGather.cu:199

Traceback (most recent call last):

 "/usr/lib64/python3.5/site-packages/flask/app.py", line 2000, in __call__
return self.wsgi_app(environ, start_response)

 "/usr/lib64/python3.5/site-packages/flask/app.py", line 1991, in wsgi_app
response = self.make_response(self.handle_exception(e))

 "/usr/lib64/python3.5/site-packages/flask_restful/__init__.py", line 271, in error_router
return original_handler(e)

 "/usr/lib64/python3.5/site-packages/flask_restful/__init__.py", line 271, in error_router
return original_handler(e)

 "/usr/lib64/python3.5/site-packages/flask/app.py", line 1567, in handle_exception
reraise(exc_type, exc_value, tb)

 "/usr/lib64/python3.5/site-packages/flask/_compat.py", line 32, in reraise
raise value.with_traceback(tb)

 "/usr/lib64/python3.5/site-packages/flask/app.py", line 1988, in wsgi_app
response = self.full_dispatch_request()

 "/usr/lib64/python3.5/site-packages/flask/app.py", line 1641, in full_dispatch_request
rv = self.handle_user_exception(e)

 "/usr/lib64/python3.5/site-packages/flask_restful/__init__.py", line 271, in error_router
return original_handler(e)

 "/usr/lib64/python3.5/site-packages/flask_restful/__init__.py", line 271, in error_router
return original_handler(e)

 "/usr/lib64/python3.5/site-packages/flask/app.py", line 1544, in handle_user_exception
reraise(exc_type, exc_value, tb)

 "/usr/lib64/python3.5/site-packages/flask/_compat.py", line 32, in reraise
raise value.with_traceback(tb)

 "/usr/lib64/python3.5/site-packages/flask/app.py", line 1639, in full_dispatch_request
rv = self.dispatch_request()

 "/usr/lib64/python3.5/site-packages/flask/app.py", line 1625, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)

 "/usr/lib64/python3.5/site-packages/flask_restful/__init__.py", line 477, in wrapper
resp = resource(*args, **kwargs)

 "/usr/lib64/python3.5/site-packages/flask/views.py", line 84, in view
return self.dispatch_request(*args, **kwargs)

 "/usr/lib64/python3.5/site-packages/flask_restful/__init__.py", line 587, in dispatch_request
resp = meth(*args, **kwargs)

 "/usr/lib64/python3.5/site-packages/webargs/core.py", line 431, in wrapper
force_all=force_all)

 "/usr/lib64/python3.5/site-packages/webargs/core.py", line 362, in parse
fill_in_missing_args(ret, schema)

 "/usr/lib64/python3.5/site-packages/webargs/core.py", line 78, in fill_in_missing_args
missing_args = all_field_names - set(ret.keys())AttributeError: 'Calculation' object has no attribute 'keys'