<p>No, you cannot, because both configurations do not represent the same functions, this pattern was introduced in the <a href="https://arxiv.org/abs/1409.1556" rel="nofollow noreferrer">VGG network paper</a>, and it is used to increase the representation power of the network. Two layers with 3x3 filters are kind of equivalent to one layer with a 5x5 filter (through composition), it is not equivalent to adding the number of filters</p>

<p>In particular, if you had a convolutional layer with 128 filters, this is not the same to having two convolutional layers with 64 filters each, specially considering that there is a ReLU activation in between them, which makes behavior more non-linear.</p>
why need to use conv2D(64) twice, instead it can be used as conv2D(128). Is both are sme or different
<pre><code>model = Sequential()
model.add(Conv2D(64, kernel_size=(3, 3), activation='relu', input_shape=(X_train.shape[1:])))
model.add(Conv2D(64,kernel_size= (3, 3), activation='relu'))
model.add(MaxPooling2D(pool_size=(2,2), strides=(2, 2)))
model.add(Dropout(0.5))
</code></pre>

<p>In the above code whether I can use con2D(128) instead of conv24(64) twice.</p>