title: ValueError when loading model that uses lambda resize layer in keras
body: <p>So basically, I trained a model with a resize layer. Here is my model:</p>
  <pre><code>model = Sequential()
  model.add(keras.layers.Lambda(
      lambda image: tf.image.resize(
          image,
          (470,470),
          method = tf.image.ResizeMethod.BICUBIC,
          preserve_aspect_ratio = True
      )
  
  ))
  model.add(Conv2D(32, (3, 3), activation='relu', input_shape=shape))
  model.add(MaxPool2D((2, 2)))
  model.add(Conv2D(64, (3, 3), activation='relu'))
  model.add(MaxPool2D((2, 2)))
  model.add(Conv2D(128, (3, 3), activation='relu'))
  model.add(MaxPool2D((2, 2)))
  model.add(Flatten())
  model.add(Dense(256, activation='relu'))
  model.add(Dropout(0.33))
  model.add(Dense(128, activation='relu'))
  model.add(Dense(1, activation='sigmoid'))
  </code></pre>
  <p>Before using the first layer, I could save and load the model, but now when loading I get this error:</p>
  <pre><code>
  ValueError: The channel dimension of the inputs should be defined. The input_shape received is (None, None, None, None), where axis -1 (0-based) is the channel dimension, which found to be `None`.
  </code></pre>
  <p>I loaded my data first like this:
  <code>model2 = load_model('catsanddogs.h5')</code></p>
  <p>and also tried some solutions from a github issue that made it like this <code>model =load_model('catsanddogs.h5',custom_objects={&quot;tf&quot;:tf})</code></p>
  <p>Does anyone know how to properly load this model?</p>