torch / torch7

http://torch.ch
Other
9k stars 2.38k forks source link

test error: nonzero and PRELU. #1051

Open cjliux opened 7 years ago

cjliux commented 7 years ago

Completed 9141787 asserts in 185 tests with 0 failures and 1 error

nonzero Function call failed $ Torch: not enough memory: you tried to allocate 580GB. Buy new RAM! at /home/cjliux/.local_install/torch/pkg/torch/lib/TH/THGeneral.c:270 stack traceback: [C]: at 0x7fe951bd4d10 [C]: in function 'FloatTensor' ...cal_install/torch/install/share/lua/5.1/cutorch/test.lua:90: in function 'createHoledTensorWithSizes' ...cal_install/torch/install/share/lua/5.1/cutorch/test.lua:105: in function 'createTestTensorWithSizes' ...cal_install/torch/install/share/lua/5.1/cutorch/test.lua:1144: in function 'v' ...cal_install/torch/install/share/lua/5.1/cutorch/test.lua:4872: in function <...cal_install/torch/install/share/lua/5.1/cutorch/test.lua:4870> [C]: in function 'xpcall' ...cal_install/torch/install/share/lua/5.1/torch/Tester.lua:477: in function '_pcall' ...cal_install/torch/install/share/lua/5.1/torch/Tester.lua:436: in function '_run' ...cal_install/torch/install/share/lua/5.1/torch/Tester.lua:355: in function 'run' ...cal_install/torch/install/share/lua/5.1/cutorch/test.lua:4890: in function 'test' [string "cutorch.test()"]:1: in main chunk [C]: in function 'pcall' ...tall/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:136: in main chunk [C]: at 0x00405d50


...cal_install/torch/install/share/lua/5.1/torch/Tester.lua:363: An error was found while running tests!

Completed 2001 asserts in 186 tests with 0 failures and 2 errors

PReLU_backward Function call failed ...x/.local_install/torch/install/share/lua/5.1/nn/THNN.lua:110: Wrong number of input planes. Expected 8 but got 6. at /home/cjliux/.local_install/torch/extra/nn/lib/THNN/generic/PReLU.c:29 stack traceback: [C]: in function 'v' ...x/.local_install/torch/install/share/lua/5.1/nn/THNN.lua:110: in function 'PReLU_updateOutput' .../.local_install/torch/install/share/lua/5.1/nn/PReLU.lua:12: in function 'forward' ....local_install/torch/install/share/lua/5.1/cunn/test.lua:5323: in function 'v' ....local_install/torch/install/share/lua/5.1/cunn/test.lua:6448: in function <....local_install/torch/install/share/lua/5.1/cunn/test.lua:6446> [C]: in function 'xpcall' ...cal_install/torch/install/share/lua/5.1/torch/Tester.lua:477: in function '_pcall' ...cal_install/torch/install/share/lua/5.1/torch/Tester.lua:436: in function '_run' ...cal_install/torch/install/share/lua/5.1/torch/Tester.lua:355: in function 'run' ....local_install/torch/install/share/lua/5.1/cunn/test.lua:6469: in function 'testcuda' [string "nn.testcuda()"]:1: in main chunk [C]: in function 'pcall' ...tall/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:136: in main chunk [C]: at 0x00405d50


PReLU_forward Function call failed ...x/.local_install/torch/install/share/lua/5.1/nn/THNN.lua:110: Wrong number of input planes. Expected 8 but got 94. at /home/cjliux/.local_install/torch/extra/nn/lib/THNN/generic/PReLU.c:29 stack traceback: [C]: in function 'v' ...x/.local_install/torch/install/share/lua/5.1/nn/THNN.lua:110: in function 'PReLU_updateOutput' .../.local_install/torch/install/share/lua/5.1/nn/PReLU.lua:12: in function 'forward' ....local_install/torch/install/share/lua/5.1/cunn/test.lua:5297: in function 'v' ....local_install/torch/install/share/lua/5.1/cunn/test.lua:6448: in function <....local_install/torch/install/share/lua/5.1/cunn/test.lua:6446> [C]: in function 'xpcall' ...cal_install/torch/install/share/lua/5.1/torch/Tester.lua:477: in function '_pcall' ...cal_install/torch/install/share/lua/5.1/torch/Tester.lua:436: in function '_run' ...cal_install/torch/install/share/lua/5.1/torch/Tester.lua:355: in function 'run' ....local_install/torch/install/share/lua/5.1/cunn/test.lua:6469: in function 'testcuda' [string "nn.testcuda()"]:1: in main chunk [C]: in function 'pcall' ...tall/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:136: in main chunk [C]: at 0x00405d50


...cal_install/torch/install/share/lua/5.1/torch/Tester.lua:363: An error was found while running tests!

QinZibo commented 7 years ago

The same with you,have you solved the problem?

peteflorence commented 7 years ago

+1 getting errors on PReLU backward and PReLU forward (Wrong number of input planes)

kdmojdehi commented 7 years ago

+1 (exactly as above)

Pengcheng-Wang commented 7 years ago

Same problem here.

ShuangjunLiu commented 6 years ago

same problem

mjorgen1 commented 6 years ago

same problem here as well. Seems to have something to do with the v function? Has anyone solved this yet?

cardwing commented 6 years ago

Same problem.

ssyl1019 commented 5 years ago

Humm, does anyone solve this problem?

tastyminerals commented 5 years ago

This comes from the following source code below:

void THNN_(PReLU_updateOutput)(
          THNNState *state,
          THTensor *input,
          THTensor *output,
          THTensor *weight,
          THIndex_t nOutputPlane)
{
  THTensor_(resizeAs)(output, input);

  if (nOutputPlane == 0)
  {
    // handle shared parameter case
    real w = *THTensor_(data)(weight);
    TH_TENSOR_APPLY2(real, output, real, input,
      *output_data = (*input_data > 0) ? *input_data : w*(*input_data);
    );
  }
  else
  {
    input = THTensor_(newContiguous)(input);
    long bs = 1, ks = 1;
    {
      long input_ndim = THTensor_(nDimension)(input);
      if (input->size[input_ndim > 1] != nOutputPlane)
        THError("Wrong number of input planes. Expected %d but got %d.", nOutputPlane, input->size[input_ndim > 1]);

The message gets triggered when the number of output planes nOutputPlane is not equal to the number of dimensions of the input tensor input_ndim in PReLU. To me it looks like an issue with the way you feed / transform your data.