Torch crashes (out of bounds) with 3D model when there is more than one Concat module involved

14 views
Skip to first unread message

Timo

unread,
Oct 21, 2016, 7:44:01 AM10/21/16
to torch7

Hello,

I try to create a model for 3D object classification. The simplest version works (no rotation, no scale only one block) [1], with the input (16x16x16) and output dimensions(16x32x16) [2]. When I add a second block [3] it crashes with this strange error [4] (bad argument #2 to '?' (out of bounds...)).

I'm new to torch so it is hard for me to make sense out of this. Is this an error of the model?


Thanks!


----------------------------------------------------------------

[1]


nn.Sequential {

 [input -> (1) -> (2) -> (3) -> (4) -> (5) -> (6) -> (7) -> (8) -> output]

 (1): nn.Parallel {

    input

      `-> (1): nn.Sequential {

            [input -> (1) -> (2) -> output]

            (1): nn.Parallel {

              input

                 `-> (1): nn.Sequential {

                       [input -> (1) -> output]

                       (1): nn.Concat {

                         input

                           |`-> (1): nn.Sequential {

                           |      [input -> (1) -> output]

                           |      (1): nn.VolumetricConvolution(1 -> 4, 3x3x3, 1,1,1, 1,1,1)

                           |    }

                            `-> (2): nn.Sequential {

                                  [input -> (1) -> output]

                                  (1): nn.VolumetricConvolution(1 -> 4, 1x1x1)

                                }

                            ... -> output

                       }

                     }

                 ... -> output

            }

            (2): nn.Reshape(1x32768)

          }

      ... -> output

 }

 (2): nn.SpatialMaxPooling(1x1, 1,1)

 (3): nn.Reshape(32768)

 (4): nn.Linear(32768 -> 512)

 (5): nn.ReLU

 (6): nn.Dropout(0.500000)

 (7): nn.Linear(512 -> 8)

 (8): nn.LogSoftMax

}



----------------------------------------------------------------

[2]

nn.Parallel {

 input

    `-> (1): nn.Sequential {

          [input -> (1) -> output]

          (1): nn.Concat {

            input

              |`-> (1): nn.Sequential {

              |      [input -> (1) -> output]

              |      (1): nn.VolumetricConvolution(1 -> 4, 3x3x3, 1,1,1, 1,1,1)

              |    }

               `-> (2): nn.Sequential {

                     [input -> (1) -> output]

                     (1): nn.VolumetricConvolution(1 -> 4, 1x1x1)

                   }

               ... -> output

          }

        }

    ... -> output

}

1000

    4

  16

  32

  16

[torch.LongStorage of size 5]


nn.Sequential {

 [input -> (1) -> output]

 (1): nn.Concat {

    input

     |`-> (1): nn.Sequential {

     |      [input -> (1) -> output]

     |      (1): nn.VolumetricConvolution(1 -> 4, 3x3x3, 1,1,1, 1,1,1)

     |    }

      `-> (2): nn.Sequential {

            [input -> (1) -> output]

            (1): nn.VolumetricConvolution(1 -> 4, 1x1x1)

          }

      ... -> output

 }

}

1000

    4

  16

  32

  16

[torch.LongStorage of size 5]




----------------------------------------------------------------

[3]

nn.Sequential {

 [input -> (1) -> (2) -> (3) -> (4) -> (5) -> (6) -> (7) -> (8) -> output]

 (1): nn.Parallel {

    input

      `-> (1): nn.Sequential {

            [input -> (1) -> (2) -> output]

            (1): nn.Parallel {

              input

                 `-> (1): nn.Sequential {

                       [input -> (1) -> (2) -> output]

                       (1): nn.Concat {

                         input

                           |`-> (1): nn.Sequential {

                           |      [input -> (1) -> output]

                           |      (1): nn.VolumetricConvolution(1 -> 4, 3x3x3, 1,1,1, 1,1,1)

                           |    }

                            `-> (2): nn.Sequential {

                                  [input -> (1) -> output]

                                  (1): nn.VolumetricConvolution(1 -> 4, 1x1x1)

                                }

                            ... -> output

                       }

                       (2): nn.Concat {

                         input

                           |`-> (1): nn.Sequential {

                           |      [input -> (1) -> output]

                           |      (1): nn.VolumetricConvolution(4 -> 8, 3x3x3, 1,1,1, 1,1,1)

                           |    }

                            `-> (2): nn.Sequential {

                                  [input -> (1) -> output]

                                  (1): nn.VolumetricConvolution(4 -> 8, 1x1x1)

                                }

                            ... -> output

                       }

                     }

                 ... -> output

            }

            (2): nn.Reshape(1x131072)

          }

      ... -> output

 }

 (2): nn.SpatialMaxPooling(1x1, 1,1)

 (3): nn.Reshape(131072)

 (4): nn.Linear(131072 -> 1024)

 (5): nn.ReLU

 (6): nn.Dropout(0.500000)

 (7): nn.Linear(1024 -> 8)

 (8): nn.LogSoftMax

}



----------------------------------------------------------------

[4]

bad argument #2 to '?' (out of bounds at /home/timo/src/torch/pkg/torch/lib/TH/generic/THStorage.c:202)

stack traceback:

    [C]: at 0x7f4000c30420

    [C]: in function '__index'

    /home/timo/src/torch/install/share/lua/5.1/nn/Concat.lua:19: in function </home/timo/src/torch/install/share/lua/5.1/nn/Concat.lua:9>

    [C]: in function 'xpcall'

    ...timo/src/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'

    ...timo/src/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function <...timo/src/torch/install/share/lua/5.1/nn/Sequential.lua:41>

    [C]: in function 'xpcall'

    ...timo/src/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'

    .../timo/src/torch/install/share/lua/5.1/nn/Parallel.lua:18: in function <.../timo/src/torch/install/share/lua/5.1/nn/Parallel.lua:10>

    [C]: in function 'xpcall'

    ...

    [C]: in function 'xpcall'

    ...timo/src/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'

    .../timo/src/torch/install/share/lua/5.1/nn/Parallel.lua:18: in function <.../timo/src/torch/install/share/lua/5.1/nn/Parallel.lua:10>

    [C]: in function 'xpcall'

    ...timo/src/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'

    ...timo/src/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'

    debug_model.lua:24: in main chunk

    [C]: in function 'dofile'

    .../src/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk

    [C]: at 0x00406670

Reply all
Reply to author
Forward
0 new messages