Tensorflow Conv3D with variable input size
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$. 

You can use similar ideas in image resizing (e.g. interpolation, Nearest-neighbor interpolation, Bilinear and bicubic algorithms, Box Sampling, ...).