title: Can I combine Conv2D and LeakyReLU into a single layer?
body: <p>The keras Conv2D layer does not come with an activation function itself. I am currently rebuilding the YOLOv1 model for practicing. In the YOLOv1 model, there are several Conv2D layers followed by activations using the leaky relu function. Is there a way to combine</p>
  <pre><code>from keras.layers import Conv2D, LeakyReLU
  
  ...
  
  def model(input):
      ...
  
      X = Conv2D(filters, kernel_size)(X)
      X = LeakyReLU(X)
  
      ...
  </code></pre>
  <p>into a single line of code, like <code>X = conv_with_leaky_relu(X)</code>? I think it should be similar to</p>
  <pre><code>def conv_with_leaky_relu(*args, **kwargs):
      X = Conv2D(*args, **kwargs)(X)
      X = LeakyReLU(X)
      return X
  </code></pre>
  <p>but this of course doesn't work because it is undefined what X ist. Any ideas?</p>