require 'cudnn'
local model = {}
table.insert(model, {'conv1_1', cudnn.SpatialConvolution(3, 64, 3, 3, 1, 1, 1, 1, 1)})
table.insert(model, {'relu1_1', cudnn.ReLU(true)})
table.insert(model, {'conv1_2', cudnn.SpatialConvolution(64, 64, 3, 3, 1, 1, 1, 1, 1)})
table.insert(model, {'relu1_2', cudnn.ReLU(true)})
table.insert(model, {'pool1', cudnn.SpatialMaxPooling(2, 2, 2, 2, 0, 0):ceil()})
table.insert(model, {'conv2_1', cudnn.SpatialConvolution(64, 128, 3, 3, 1, 1, 1, 1, 1)})
table.insert(model, {'relu2_1', cudnn.ReLU(true)})
table.insert(model, {'conv2_2', cudnn.SpatialConvolution(128, 128, 3, 3, 1, 1, 1, 1, 1)})
table.insert(model, {'relu2_2', cudnn.ReLU(true)})
table.insert(model, {'pool2', cudnn.SpatialMaxPooling(2, 2, 2, 2, 0, 0):ceil()})
table.insert(model, {'conv3_1', cudnn.SpatialConvolution(128, 256, 3, 3, 1, 1, 1, 1, 1)})
table.insert(model, {'relu3_1', cudnn.ReLU(true)})
table.insert(model, {'conv3_2', cudnn.SpatialConvolution(256, 256, 3, 3, 1, 1, 1, 1, 1)})
table.insert(model, {'relu3_2', cudnn.ReLU(true)})
table.insert(model, {'conv3_3', cudnn.SpatialConvolution(256, 256, 3, 3, 1, 1, 1, 1, 1)})
table.insert(model, {'relu3_3', cudnn.ReLU(true)})
table.insert(model, {'conv3_4', cudnn.SpatialConvolution(256, 256, 3, 3, 1, 1, 1, 1, 1)})
table.insert(model, {'relu3_4', cudnn.ReLU(true)})
table.insert(model, {'pool3', cudnn.SpatialMaxPooling(2, 2, 2, 2, 0, 0):ceil()})
table.insert(model, {'conv4_1', cudnn.SpatialConvolution(256, 512, 3, 3, 1, 1, 1, 1, 1)})
table.insert(model, {'relu4_1', cudnn.ReLU(true)})
table.insert(model, {'conv4_2', cudnn.SpatialConvolution(512, 512, 3, 3, 1, 1, 1, 1, 1)})
table.insert(model, {'relu4_2', cudnn.ReLU(true)})
table.insert(model, {'conv4_3', cudnn.SpatialConvolution(512, 512, 3, 3, 1, 1, 1, 1, 1)})
table.insert(model, {'relu4_3', cudnn.ReLU(true)})
table.insert(model, {'conv4_4', cudnn.SpatialConvolution(512, 512, 3, 3, 1, 1, 1, 1, 1)})
table.insert(model, {'relu4_4', cudnn.ReLU(true)})
table.insert(model, {'pool4', cudnn.SpatialMaxPooling(2, 2, 2, 2, 0, 0):ceil()})
table.insert(model, {'conv5_1', cudnn.SpatialConvolution(512, 512, 3, 3, 1, 1, 1, 1, 1)})
table.insert(model, {'relu5_1', cudnn.ReLU(true)})
table.insert(model, {'conv5_2', cudnn.SpatialConvolution(512, 512, 3, 3, 1, 1, 1, 1, 1)})
table.insert(model, {'relu5_2', cudnn.ReLU(true)})
table.insert(model, {'conv5_3', cudnn.SpatialConvolution(512, 512, 3, 3, 1, 1, 1, 1, 1)})
table.insert(model, {'relu5_3', cudnn.ReLU(true)})
table.insert(model, {'conv5_4', cudnn.SpatialConvolution(512, 512, 3, 3, 1, 1, 1, 1, 1)})
table.insert(model, {'relu5_4', cudnn.ReLU(true)})
return model