Skip to content

Commit

Permalink
examples: Remove (1,1,1)-maxpoolings
Browse files Browse the repository at this point in the history
  • Loading branch information
mdraw committed Aug 7, 2017
1 parent 917bdea commit c81294e
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 40 deletions.
18 changes: 9 additions & 9 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -555,17 +555,17 @@ function inside the `network config file <https://github.com/ELEKTRONN/ELEKTRONN
out = neuromancer.Conv(inp, 20, (1,6,6), (1,2,2))
out = neuromancer.Conv(out, 30, (1,5,5), (1,2,2))
out = neuromancer.Conv(out, 40, (1,5,5), (1,1,1))
out = neuromancer.Conv(out, 80, (4,4,4), (2,1,1))
out = neuromancer.Conv(out, 40, (1,5,5))
out = neuromancer.Conv(out, 80, (4,4,4))
out = neuromancer.Conv(out, 100, (3,4,4), (1,1,1))
out = neuromancer.Conv(out, 100, (3,4,4), (1,1,1))
out = neuromancer.Conv(out, 150, (2,4,4), (1,1,1))
out = neuromancer.Conv(out, 200, (1,4,4), (1,1,1))
out = neuromancer.Conv(out, 200, (1,4,4), (1,1,1))
out = neuromancer.Conv(out, 100, (3,4,4))
out = neuromancer.Conv(out, 100, (3,4,4))
out = neuromancer.Conv(out, 150, (2,4,4))
out = neuromancer.Conv(out, 200, (1,4,4))
out = neuromancer.Conv(out, 200, (1,4,4)))
out = neuromancer.Conv(out, 200, (1,1,1), (1,1,1))
out = neuromancer.Conv(out, 2, (1,1,1), (1,1,1), activation_func='lin')
out = neuromancer.Conv(out, 200, (1,1,1))
out = neuromancer.Conv(out, 2, (1,1,1), activation_func='lin')
probs = neuromancer.Softmax(out)
target = neuromancer.Input_like(probs, override_f=1, name='target')
Expand Down
30 changes: 15 additions & 15 deletions examples/unet3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,34 +61,34 @@ def create_model():
inp = neuromancer.Input(in_sh, 'b,f,z,x,y', name='raw')

# Convolution, downsampling of intermediate features
conv0 = neuromancer.Conv(inp, 32, (3,3,3), (1,1,1))
conv1 = neuromancer.Conv(conv0, 64, (3,3,3), (1,1,1))
conv0 = neuromancer.Conv(inp, 32, (3,3,3))
conv1 = neuromancer.Conv(conv0, 64, (3,3,3))
down0 = neuromancer.Pool(conv1, (2,2,2), mode='max') # mid res
conv2 = neuromancer.Conv(down0, 64, (3,3,3), (1,1,1))
conv3 = neuromancer.Conv(conv2, 128, (3,3,3), (1,1,1))
conv2 = neuromancer.Conv(down0, 64, (3,3,3))
conv3 = neuromancer.Conv(conv2, 128, (3,3,3))
down1 = neuromancer.Pool(conv3, (2,2,2), mode='max') # low res
conv4 = neuromancer.Conv(down1, 128, (3,3,3), (1,1,1))
conv5 = neuromancer.Conv(conv4, 256, (3,3,3), (1,1,1))
conv4 = neuromancer.Conv(down1, 128, (3,3,3))
conv5 = neuromancer.Conv(conv4, 256, (3,3,3))
down2 = neuromancer.Pool(conv5, (2,2,2), mode='max') # very low res
conv6 = neuromancer.Conv(down2, 256, (3,3,3), (1,1,1))
conv7 = neuromancer.Conv(conv6, 512, (3,3,3), (1,1,1))
conv6 = neuromancer.Conv(down2, 256, (3,3,3))
conv7 = neuromancer.Conv(conv6, 512, (3,3,3))

# Merging very low-res features with low-res features
mrg0 = neuromancer.UpConvMerge(conv5, conv7, 512)
mconv0 = neuromancer.Conv(mrg0, 256, (3,3,3), (1,1,1))
mconv1 = neuromancer.Conv(mconv0, 256, (3,3,3), (1,1,1))
mconv0 = neuromancer.Conv(mrg0, 256, (3,3,3))
mconv1 = neuromancer.Conv(mconv0, 256, (3,3,3))

# Merging low-res with mid-res features
mrg1 = neuromancer.UpConvMerge(conv3, mconv1, 256)
mconv2 = neuromancer.Conv(mrg1, 128, (3,3,3), (1,1,1))
mconv3 = neuromancer.Conv(mconv2, 128, (3,3,3), (1,1,1))
mconv2 = neuromancer.Conv(mrg1, 128, (3,3,3))
mconv3 = neuromancer.Conv(mconv2, 128, (3,3,3))

# Merging mid-res with high-res features
mrg2 = neuromancer.UpConvMerge(conv1, mconv3, 128)
mconv4 = neuromancer.Conv(mrg2, 64, (3,3,3), (1,1,1))
mconv5 = neuromancer.Conv(mconv4, 64, (3,3,3), (1,1,1))
mconv4 = neuromancer.Conv(mrg2, 64, (3,3,3))
mconv5 = neuromancer.Conv(mconv4, 64, (3,3,3))

barr = neuromancer.Conv(mconv5, 2, (1,1,1), (1,1,1), activation_func='lin', name='barr')
barr = neuromancer.Conv(mconv5, 2, (1,1,1), activation_func='lin', name='barr')
probs = neuromancer.Softmax(barr)

target = neuromancer.Input_like(mconv5, override_f=1, name='target')
Expand Down
32 changes: 16 additions & 16 deletions examples/unet3d_lite.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,35 +54,35 @@ def create_model():
inp = neuromancer.Input(in_sh, 'b,f,z,x,y', name='raw')

# Convolution, downsampling of intermediate features
conv0 = neuromancer.Conv(inp, 32, (1,3,3), (1,1,1))
conv1 = neuromancer.Conv(conv0, 32, (1,3,3), (1,1,1))
conv0 = neuromancer.Conv(inp, 32, (1,3,3))
conv1 = neuromancer.Conv(conv0, 32, (1,3,3))
down0 = neuromancer.Pool(conv1, (1,2,2), mode='max') # mid res
conv2 = neuromancer.Conv(down0, 64, (1,3,3), (1,1,1))
conv3 = neuromancer.Conv(conv2, 64, (1,3,3), (1,1,1))
conv2 = neuromancer.Conv(down0, 64, (1,3,3))
conv3 = neuromancer.Conv(conv2, 64, (1,3,3))
down1 = neuromancer.Pool(conv3, (1,2,2), mode='max') # low res
conv4 = neuromancer.Conv(down1, 128, (1,3,3), (1,1,1))
conv5 = neuromancer.Conv(conv4, 128, (1,3,3), (1,1,1))
conv4 = neuromancer.Conv(down1, 128, (1,3,3))
conv5 = neuromancer.Conv(conv4, 128, (1,3,3))
down2 = neuromancer.Pool(conv5, (1,2,2), mode='max') # very low res
conv6 = neuromancer.Conv(down2, 256, (3,3,3), (1,1,1))
conv7 = neuromancer.Conv(conv6, 256, (3,3,3), (1,1,1))
conv6 = neuromancer.Conv(down2, 256, (3,3,3))
conv7 = neuromancer.Conv(conv6, 256, (3,3,3))

# Merging very low-res features with low-res features
mrg0 = neuromancer.UpConvMerge(conv5, conv7, 512)
mconv0 = neuromancer.Conv(mrg0, 256, (1,3,3), (1,1,1))
mconv1 = neuromancer.Conv(mconv0, 256, (1,3,3), (1,1,1))
mconv0 = neuromancer.Conv(mrg0, 256, (1,3,3))
mconv1 = neuromancer.Conv(mconv0, 256, (1,3,3))

# Merging low-res with mid-res features
mrg1 = neuromancer.UpConvMerge(conv3, mconv1, 256)
mconv2 = neuromancer.Conv(mrg1, 128, (3,3,3), (1,1,1))
mconv3 = neuromancer.Conv(mconv2, 128, (3,3,3), (1,1,1))
mconv2 = neuromancer.Conv(mrg1, 128, (3,3,3))
mconv3 = neuromancer.Conv(mconv2, 128, (3,3,3))

# Merging mid-res with high-res features
mrg2 = neuromancer.UpConvMerge(conv1, mconv3, 128)
mconv4 = neuromancer.Conv(mrg2, 64, (3,3,3), (1,1,1))
mconv5 = neuromancer.Conv(mconv4, 64, (3,3,3), (1,1,1))
mconv4 = neuromancer.Conv(mrg2, 64, (3,3,3))
mconv5 = neuromancer.Conv(mconv4, 64, (3,3,3))

barr = neuromancer.Conv(mconv5, 2, (1,1,1), (1,1,1), activation_func='lin', name='barr')
probs = neuromancer.Softmax(barr)
barr = neuromancer.Conv(mconv5, 2, (1,1,1), activation_func='lin', name='barr')
probs = neuromancer.Softmax(barr)

target = neuromancer.Input_like(mconv5, override_f=1, name='target')

Expand Down

0 comments on commit c81294e

Please sign in to comment.