Comments (4)
Order of the vars does matter here. Backward returns correspond to forward arg order.
from module-1.
These functions are a bit confusing and should have more clear naming.
However, that test is correct. If you look at the backward it is calling you can see that it just passes d_output back. which is 5.
class Temp(minitorch.FunctionBase):
"Implements additions"
@staticmethod
def backward(ctx, d_output):
return d_output, d_output
from module-1.
@srush
But this is not true, as the function is Temp2 (not Temp1) at the line 53 assert:
`class Temp2(minitorch.FunctionBase):
"Implements additions"
@staticmethod
def backward(ctx, d_output):
x = ctx.saved_values
return d_output, x * d_output`
and that's why I think it should be 5 * 10 (as in the line 45 assert); this should be true regardless as is the same function, just the order of parameters change compared to the line 45 assert.
from module-1.
Oh sorry I read the wrong line.
On line 53 it is temp2, but the var is switched. It's the first one (not times x). Constants are dropped.
from module-1.
Related Issues (7)
- (doc) Questions on back-propagation algorithm HOT 7
- Bug Report: some thing in class LT(ScalarFunction) HOT 1
- Alternate solution for Task 1.2 does not pass tests HOT 2
- autograd fail when setup HOT 1
- (bug) code that's not covered in the test case and happens to be buggy HOT 3
- (doc) Small typo in instructions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from module-1.