Home Get dzdx of any NN layer in python
Reply: 0

Get dzdx of any NN layer in python

user828
1#
user828 Published in June 19, 2018, 6:10 pm

In matlab we use matconvnet's vl_nnconv with x, y. This is how it looks in matlab.

Example 1

x = randn(29, 29, 512)
y = randn(15, 15, 512)
[dzdx] = vl_nnconv(x, y)

Example 2

x = randn(29, 29, 512)
y = randn(15, 15, 512)
[dzdx] = vl_nnpool(x, y)

Assume that in Example 2 x is a matrix of size (29, 29, 512) and y is a matrix of size (15, 15, 512). The result is dzdx, of shape (29, 29, 512).

I am interested in exactly the same thing but in python, pytorch or keras precisely. I am trying to use just a simple numpy array (or a pytorch tensor/variable) for my equivalent of x and y (and weights). Is there anyway that can be achieved? Thanks

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.324832 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO