Skip to content

Commit

Permalink
WIP #541 Updated ImportTorch examples
Browse files Browse the repository at this point in the history
  • Loading branch information
brollb committed Jul 26, 2016
1 parent a438470 commit 598ead9
Show file tree
Hide file tree
Showing 16 changed files with 3,389 additions and 447 deletions.
7 changes: 0 additions & 7 deletions test/plugins/ImportTorch/ImportTorch.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,11 @@ var testFixture = require('../../globals'),
fs = require('fs'),
BASE_DIR = testFixture.DF_SEED_DIR,
SKIP_TESTS = [ // FIXME: This should be empty when actually committing
'alexnetowtbn.lua',
'alexnet.lua',
'ninbn.lua',
'overfeat.lua',
'vggbn.lua',
'basic3.lua',
'googlenet.lua',
'basic4.lua'
],
ONLY_TESTS = [
'googlenet-setters.lua',
'vgg.lua'
];

describe('ImportTorch', function () {
Expand Down
296 changes: 143 additions & 153 deletions test/test-cases/models/alexnetowt.yml
Original file line number Diff line number Diff line change
@@ -1,204 +1,194 @@
- type: View
id: /a/0
- type: SpatialConvolution
id: /P/0
next:
- /a/y
- /P/2
attributes:
calculateDimensionality: 'function calcDims(layer) return 1; --[[ return output dimensions --]] end'
dimensionalityTransform: same
sizes: 9216
padH: 1
padW: 1
dH: 1
dW: 1
kH: 3
kW: 3
nOutputPlane: 384
nInputPlane: 192
- type: ReLU
id: /a/3
id: /P/2
next:
- /P/fX
attributes:
p: true
- type: Dropout
id: /P/6
next:
- /a/u
- /P/C
attributes:
calculateDimensionality: 'function calcDims(layer) return 1; --[[ return output dimensions --]] end'
dimensionalityTransform: same
v1: ''
inplace: ''
p: 0.5
- type: Linear
id: /a/4o
id: /P/8p
next:
- /a/L
- /P/S8
attributes:
calculateDimensionality: 'function calcDims(layer) return 1; --[[ return output dimensions --]] end'
dimensionalityTransform: same
output: 4096
input: 9216
bias: ''
outputSize: 5
inputSize: 4096
- type: SpatialConvolution
id: /a/9
id: /P/A
next:
- /a/z
- /P/j
attributes:
calculateDimensionality: 'function calcDims(layer) return 1; --[[ return output dimensions --]] end'
dimensionalityTransform: same
strideHeight: 1
strideWidth: 1
kernelHeight: 5
kernelWidth: 5
padH: 2
padW: 2
dH: 1
dW: 1
kH: 5
kW: 5
nOutputPlane: 192
nInputPlane: 64
- type: SpatialConvolution
id: /a/C
- type: Linear
id: /P/C
next:
- /a/J
- /P/mQ
attributes:
calculateDimensionality: 'function calcDims(layer) return 1; --[[ return output dimensions --]] end'
dimensionalityTransform: same
strideHeight: 4
strideWidth: 4
kernelHeight: 11
kernelWidth: 11
nOutputPlane: 64
nInputPlane: 3
- type: LogSoftMax
id: /a/E0
next: []
attributes:
calculateDimensionality: 'function calcDims(layer) return 1; --[[ return output dimensions --]] end'
dimensionalityTransform: same
bias: ''
outputSize: 4096
inputSize: 9216
- type: ReLU
id: /a/J
id: /P/F
next:
- /a/j
- /P/R
attributes:
calculateDimensionality: 'function calcDims(layer) return 1; --[[ return output dimensions --]] end'
dimensionalityTransform: same
- type: ReLU
id: /a/L
p: true
- type: Linear
id: /P/H
next:
- /a/l
- /P/e
attributes:
calculateDimensionality: 'function calcDims(layer) return 1; --[[ return output dimensions --]] end'
dimensionalityTransform: same
- type: SpatialConvolution
id: /a/U
bias: ''
outputSize: 4096
inputSize: 4096
- type: SpatialMaxPooling
id: /P/J
next:
- /a/e
- /P/A
attributes:
calculateDimensionality: 'function calcDims(layer) return 1; --[[ return output dimensions --]] end'
dimensionalityTransform: same
strideHeight: 1
strideWidth: 1
kernelHeight: 3
kernelWidth: 3
nOutputPlane: 256
nInputPlane: 384
- type: ReLU
id: /a/X
padW: 0
padH: 0
ceil_mode: false
dH: 2
dW: 2
kH: 3
kW: 3
- type: Dropout
id: /P/L
next:
- /a/U
- /P/H
attributes:
calculateDimensionality: 'function calcDims(layer) return 1; --[[ return output dimensions --]] end'
dimensionalityTransform: same
- type: ReLU
id: /a/e
v1: ''
inplace: ''
p: 0.5
- type: View
id: /P/M
next:
- /a/q
- /P/6
attributes:
calculateDimensionality: 'function calcDims(layer) return 1; --[[ return output dimensions --]] end'
dimensionalityTransform: same
- type: SpatialMaxPooling
id: /a/h
numInputDims: null
params: 9216
- type: SpatialConvolution
id: /P/R
next:
- /a/t
- /P/i
attributes:
calculateDimensionality: 'function calcDims(layer) return 1; --[[ return output dimensions --]] end'
dimensionalityTransform: same
strideHeight: 2
strideWidth: 2
kernelHeight: 3
kernelWidth: 3
padH: 1
padW: 1
dH: 1
dW: 1
kH: 3
kW: 3
nOutputPlane: 256
nInputPlane: 256
- type: LogSoftMax
id: /P/S8
next: []
attributes: {}
- type: SpatialMaxPooling
id: /a/j
next:
- /a/9
attributes:
calculateDimensionality: 'function calcDims(layer) return 1; --[[ return output dimensions --]] end'
dimensionalityTransform: same
strideHeight: 2
strideWidth: 2
kernelHeight: 3
kernelWidth: 3
- type: Dropout
id: /a/l
id: /P/c
next:
- /a/o
- /P/0
attributes:
calculateDimensionality: 'function calcDims(layer) return 1; --[[ return output dimensions --]] end'
dimensionalityTransform: same
probability: 0.5
- type: Linear
id: /a/o
padW: 0
padH: 0
ceil_mode: false
dH: 2
dW: 2
kH: 3
kW: 3
- type: SpatialConvolution
id: /P/d
next:
- /a/r
- /P/q
attributes:
calculateDimensionality: 'function calcDims(layer) return 1; --[[ return output dimensions --]] end'
dimensionalityTransform: same
output: 4096
input: 4096
- type: Linear
id: /a/p
padH: 2
padW: 2
dH: 4
dW: 4
kH: 11
kW: 11
nOutputPlane: 64
nInputPlane: 3
- type: ReLU
id: /P/e
next:
- /a/E0
- /P/8p
attributes:
calculateDimensionality: 'function calcDims(layer) return 1; --[[ return output dimensions --]] end'
dimensionalityTransform: same
output: 5
input: 4096
p: ''
- type: SpatialConvolution
id: /a/q
id: /P/fX
next:
- /a/3
- /P/F
attributes:
calculateDimensionality: 'function calcDims(layer) return 1; --[[ return output dimensions --]] end'
dimensionalityTransform: same
strideHeight: 1
strideWidth: 1
kernelHeight: 3
kernelWidth: 3
padH: 1
padW: 1
dH: 1
dW: 1
kH: 3
kW: 3
nOutputPlane: 256
nInputPlane: 256
nInputPlane: 384
- type: ReLU
id: /a/r
id: /P/i
next:
- /a/p
- /P/n5
attributes:
calculateDimensionality: 'function calcDims(layer) return 1; --[[ return output dimensions --]] end'
dimensionalityTransform: same
- type: SpatialConvolution
id: /a/t
p: true
- type: ReLU
id: /P/j
next:
- /a/X
- /P/c
attributes:
calculateDimensionality: 'function calcDims(layer) return 1; --[[ return output dimensions --]] end'
dimensionalityTransform: same
strideHeight: 1
strideWidth: 1
kernelHeight: 3
kernelWidth: 3
nOutputPlane: 384
nInputPlane: 192
- type: SpatialMaxPooling
id: /a/u
p: true
- type: ReLU
id: /P/mQ
next:
- /a/0
- /P/L
attributes:
calculateDimensionality: 'function calcDims(layer) return 1; --[[ return output dimensions --]] end'
dimensionalityTransform: same
strideHeight: 2
strideWidth: 2
kernelHeight: 3
kernelWidth: 3
- type: Dropout
id: /a/y
p: ''
- type: SpatialMaxPooling
id: /P/n5
next:
- /a/4o
- /P/M
attributes:
calculateDimensionality: 'function calcDims(layer) return 1; --[[ return output dimensions --]] end'
dimensionalityTransform: same
probability: 0.5
padW: 0
padH: 0
ceil_mode: false
dH: 2
dW: 2
kH: 3
kW: 3
- type: ReLU
id: /a/z
id: /P/q
next:
- /a/h
- /P/J
attributes:
calculateDimensionality: 'function calcDims(layer) return 1; --[[ return output dimensions --]] end'
dimensionalityTransform: same
p: true
Loading

0 comments on commit 598ead9

Please sign in to comment.