简体   繁体   中英

the input shape of array about Keras on Tensorflow

I have a question about the 4D tensor on keras about Convolution2D Layers.

The Keras doc says: 4D tensor with shape: (samples, channels, rows, cols) if dim_ordering='th' or 4D tensor with shape: (samples, rows, cols, channels) if dim_ordering='tf'.

I use 'tf', how about my input? When I use (samples, channels, rows, cols) , it is ok, but when I use (samples, rows, cols, channels) as input, it has some problems.

Keras假设如果使用tensorflow,那么您将使用(samples, channels, rows, cols)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM