Skip to content
Shanu Kumar edited this page Aug 2, 2017 · 10 revisions

Info

Our model consists of

model = nn.Sequential()
model:add(nn.SpatialConvolution(3,6,5,5))
model:add(nn.SpatialMaxPooling(2,2,2,2))
model:add(nn.ReLU())
model:add(nn.SpatialConvolution(6,16,5,5))
model:add(nn.SpatialMaxPooling(2,2,2,2))
model:add(nn.ReLU())
model:add(nn.View(16*2*2))
model:add(nn.Linear(16*2*2,120))
model:add(nn.ReLU())
model:add(nn.Linear(120,80))
model:add(nn.ReLU())
model:add(nn.Linear(80,36))
model:add(nn.LogSoftMax())

Training

We have train our model upto 100 iterations.

module = nn.SpatialConvolution(nInputPlane, nOutputPlane, kW, kH)
  • kW: The kernel width of the convolution.
  • kh: The kernel height of the convolution. Filter used is of size 5x5.
module = nn.SpatialMaxPooling(kW, kH, dW, dH)
  • kW: The kernel width of the convolution.
  • kh: The kernel height of the convolution.
  • dW: The step of the convolution in the width dimension.
  • dh: The step of the convolution in the height dimension.

ReLU is defined asf(x) = max(0,x)

LogSoftmax is defined as f_i(x) = log(1/a exp(x_i)), where a = sum_j exp(x_j).

Clone this wiki locally