Autokeras: RuntimeError: invalid argument 2: input image (T: 4 H: 4 W: 1) smaller than kernel size (kT: 2 kH: 2 kW: 2)

Created on 26 Mar 2019  路  2Comments  路  Source: keras-team/autokeras

Hi,

I am training with data size [batches, 80, 80, 20, channels]. As of now I only have one channel but I will increase the number soon. My images are 3D volumes of 80x80x20 and I am using an ImageClassifier3D for a binary classification. Does anyone know what might be going on?

Thanks,
Miguel.

|               Training model 1               |
+----------------------------------------------+
Using TensorFlow backend.

No loss decrease after 5 epochs.


Saving model.
+--------------------------------------------------------------------------+
|        Model ID        |          Loss          |      Metric Value      |
+--------------------------------------------------------------------------+
|           1            |      0.6787109375      |   0.6288659793814433   |
+--------------------------------------------------------------------------+


+----------------------------------------------+
|               Training model 2               |
+----------------------------------------------+
Using TensorFlow backend.
Epoch-1, Current Metric - 0:   0%|                                        | 0/9 [00:00<?, ? batch/s]Process SpawnProcess-3:
Traceback (most recent call last):
  File "/home/miguel/anaconda3/envs/autokeras/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/home/miguel/anaconda3/envs/autokeras/lib/python3.6/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "/home/miguel/anaconda3/envs/autokeras/lib/python3.6/site-packages/autokeras/search.py", line 351, in train
    raise e
  File "/home/miguel/anaconda3/envs/autokeras/lib/python3.6/site-packages/autokeras/search.py", line 344, in train
    verbose=verbose).train_model(**trainer_args)
  File "/home/miguel/anaconda3/envs/autokeras/lib/python3.6/site-packages/autokeras/nn/model_trainer.py", line 137, in train_model
    self._train()
  File "/home/miguel/anaconda3/envs/autokeras/lib/python3.6/site-packages/autokeras/nn/model_trainer.py", line 173, in _train
    outputs = self.model(inputs)
  File "/home/miguel/anaconda3/envs/autokeras/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/miguel/anaconda3/envs/autokeras/lib/python3.6/site-packages/autokeras/nn/graph.py", line 689, in forward
    temp_tensor = torch_layer(edge_input_tensor)
  File "/home/miguel/anaconda3/envs/autokeras/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/miguel/anaconda3/envs/autokeras/lib/python3.6/site-packages/torch/nn/modules/pooling.py", line 638, in forward
    self.padding, self.ceil_mode, self.count_include_pad)
RuntimeError: invalid argument 2: input image (T: 4 H: 4 W: 1) smaller than kernel size (kT: 2 kH: 2 kW: 2) at /opt/conda/conda-bld/pytorch_1550802451070/work/aten/src/THCUNN/generic/VolumetricAveragePooling.cu:57
wontfix

All 2 comments

I have the same problem. Can somebody explain why??

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xuzhang5788 picture xuzhang5788  路  4Comments

ikscapes picture ikscapes  路  3Comments

anavanab99 picture anavanab99  路  4Comments

SunYanCN picture SunYanCN  路  5Comments

mlaradji picture mlaradji  路  4Comments