2017-06-28 88 views

回答

1

Keras source code

參數

shape: A shape tuple (integer), not including the batch size. 
     For instance, `shape=(32,)` indicates that the expected input 
     will be batches of 32-dimensional vectors. 
    batch_shape: A shape tuple (integer), including the batch size. 
     For instance, `batch_shape=(10, 32)` indicates that 
     the expected input will be batches of 10 32-dimensional vectors. 
     `batch_shape=(None, 32)` indicates batches of an arbitrary number 
     of 32-dimensional vectors. 

批量大小是多少例子在你的訓練數據。

您可以使用任何。我個人從未使用過「batch_shape」。當你使用「形狀」時,你的批量可以是任意大小,你不必關心它。

shape=(32,)的含義與batch_shape=(None,32)相同