0809zheng / cs231n-assignment2019 Goto Github PK
View Code? Open in Web Editor NEWCS231n 2019年春季学期课程作业
CS231n 2019年春季学期课程作业
svm_loss_vectorized函数的loss部分没有加上正则项。
正则项实测数量级非常小,所以在作业里比较循环写法和矩阵写法是否一致时体现不出来
https://github.com/0809zheng/CS231n-assignment2019/blob/master/assignment2/cs231n/layers.py#L726
应该是 dx[n, c, i * stride + int(row), j * stride + int(col)] += dout[n, c, i, j]
之前的答案能通过,是因为正好测试用例中,max_pool 的stride 和长宽都为2,没有元素被多次覆盖。
当你把测试用例改为
np.random.seed(231)
x = np.random.randn(3, 2, 8, 8)
dout = np.random.randn(3, 2, 6, 6)
pool_param = {'pool_height': 3, 'pool_width': 3, 'stride': 1}
dx_num = eval_numerical_gradient_array(lambda x: max_pool_forward_naive(x, pool_param)[0], x, dout)
out, cache = max_pool_forward_naive(x, pool_param)
dx = max_pool_backward_naive(dout, cache)
print('Testing max_pool_backward_naive function:')
print('dx error: ', rel_error(dx, dx_num))
原答案就没发通过了。
看了大佬你2019CS231的作业, 对于矩阵求导这一块还是有点稀里糊涂的,感觉没有一套成熟的方法。所以想请教您是怎么学习矩阵求导的。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.