How to make a smooth core in Nevolution Networks with MXNet mesh?

My datasets are MNIST and ML library is MXNet

I used the CNN algorithm to practice ML. Then I found the reference guide, pages 6 and 7 .

smooth core

I think that the default kernel is all instances of "1" in the matrix (core in MXNet). How to make a smooth core, for example, above a slide.


This is MXNet code with R.

mx.symbol.Convolution(data=data, kernel=c(5,5), num_filter=20) 
+5
source share
1 answer

As already mentioned, MXNet is the foundation for deep learning. The slides you referred to are image processing tasks that other optimized tools have, OpenCV , which is one of the most popular. However, you can do a simple convolution using MXNet. In python, it will look like this:

 # Replace img with an actual image img = np.random.uniform(size=(1, 1, 480, 640)) img = mx.nd.array(img) w = mx.nd.array([[0, -1, 0], [-1, 5, -1], [0, -1, 0]]) w.reshape((1, 1, 3, 3)) out = mx.nd.Convolution( img, w, kernel=(3, 3), num_filter=1, no_bias=True, pad=(1, 1)) 
+1
source

Source: https://habr.com/ru/post/1240837/


All Articles