jgs Assignment 04 1. Select a new dataset. Lecture 08 https://archive-beta.ics.uci.edu Your own CSV data from a project you are working on 2. Create a Java Program for training a model until achieving a good performance (0.05). Save the model. This can be console application or GUI. Your choice. 3. Create a Java Application that use the model. It should have a GUI Allow the user to input data: load an image, text, etc. Show a result/classification § You can work in a team of 2 or 3. No more than 3. Individual is OK. § Include Javadoc for classes and methods. https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html § Submit java files. How many files?
jgs Problem § Imagine that we need to process images of size 300 x 300; § The input layer will have 90,000 neurons. § Then, if the next layer also has 90,000 neurons, there will be 90000 x 90000 connections between these two layers, which is a lot. § We have a problem for larger images! § For 28 x 28 images such as digits from MNIST, this was not a big deal
jgs Solution § Convolutional Networks § Each neuron can interact with and make decisions based on a region of information. filter features matrix pooling ... convolution
jgs Convolution § Mathematical operation which takes two inputs: (a) image matrix (small square of input data) and, (b) a filter (or kernel). The result is called a Features Matrix § Learning image features while preserving the relationship between pixels. filter features matrix convolution
jgs Filters § There are a set of few filters that are used to perform a few tasks. blur sharp borders 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0 -1 0 -1 5 -1 0 -1 0 -1 0 1 -2 0 2 -1 0 1 -1 -2 -1 0 0 0 1 2 1 horizontal vertical
jgs Filters § Our Filters are not defined. Filters are just collections of Ws. § The value of each filter is learned during the training process. They are updated every backpropagation § Each filter in this layer is randomly initialized to some distribution (Normal, Gaussian, etc.). By having different initialization criteria, each filter gets trained slightly differently. They eventually learn to detect different features in the image. § Convolution of an image with different filters can perform an operation such as blur, sharpen, and edge detection by applying filters.
jgs Stride § The number of pixels which are shift over the input matrix. § When the stride is equaled to 1, then we move the filters to 1 pixel at a time and similarly, if the stride is equaled to 2, then we move the filters to 2 pixels at a time, etc. 11 21 31 41 51 12 22 32 42 52 13 23 33 43 53 14 24 34 44 54 15 25 35 45 54 61 62 63 64 65 0 1 2 3 4 16 26 36 46 55 10 20 30 40 50 66 60 5 6 1 1 1 1 1 1 1 1 1 99 117 135 279 * =
jgs Padding § The pixel in the corner will only get covers one time, but the middle pixels will get covered more than once. § Padding refers to the number of pixels added to an image when it is being processed 1 0 0 0 0 1 1 0 0 1 1 1 1 1 1 0 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
jgs Pooling § Pooling is downscaling of the image obtained from the previous layers. § It can be compared to shrinking an image to reduce its pixel density § Options: Max-pooling, Average-pooling, Sum-pooling 11 21 31 12 22 32 13 23 33 0 2 3 10 20 30 1 2x2 Max pooling 33 11 31 13
jgs Use § This type of network is used frequently in image and video processing applications. § But they have a wide applicability in practical situations.
jgs Architecture § It is always a good idea to use the existing architectures, as it solves a lot of time § Producing a good architecture on your own is a challenging task. Example for MNIST: 1. 20 filters of 5 x 5 in convolutional layer 2. Max pooling 3. 50 filters of 5 x 5 in convolutional layer 4. Max pooling 5. Fully connected layers with 500 neurons 6. Output layer with SoftMax
Ph.D. [email protected] Spring 2022 Copyright. These slides can only be used as study material for the class CSE205 at Arizona State University. They cannot be distributed or used for another purpose.