# Tensorflow Conv3D with variable input size

I have a hypotethical question: Is it possible to train Conv3D with variable input size?

Sample dim = Length x Width x Depth ; Depth are fixed per each samples, let's say 500. However Length x Width can vary, e.g.:

Sample 1 = 50 x 4 x 500 Sample 2 = 7 x 7 x 500 Sample 3 = 10 x 13 x 500 ..... Sample n = 5 x 32 x 500

These are for classification problems, the next class could have a different sample size, e.g.:

Sample 4 = 6 x 8 x 500 (from class 2) Sample 5 = 3 x 32 x 500 (from class 2) .... Sample m = 10 x 11 x 500 (also from class 2)

In Keras, you should specify the shape of your inputs and that shape should be fixed. Then you probably have to somehow resize all of your samples to a fix size $$m \times n \times 500$$.