Reputation: 33
I am having video of (x,y) height and width, I am resizing the video to height 320 and width 120 with 3 channel of RGB. Now I am merging 60 frames from a video and created depth of 60 from total 10200 frames. Now I am not sure for training model with conv3d my input shape of (170, 60, 320, 120, 3) is correct. Is this format correct (batch, depth, height, width, channel) for input_shape in tensorflow.
Upvotes: 1
Views: 430
Reputation: 1482
According to the Conv3D docs in the latest version of tensorflow as of this post, the default shape is channels_last. But you can change the data_format
parameter to be either channels_last
or channels_first
. And it is always batch_size
first. So in your case, a proper setup could be
input_shape =(170, 60, 320, 120, 3)
Conv3D(n_filters, kernel_size, input_shape=input_shape[1:])
OR
input_shape =(170, 3, 60, 320, 120)
Conv3D(n_filters, kernel_size, input_shape=input_shape[1:], data_format='channels_first')
Upvotes: 1