Cannot take the length of Shape with unknown rank
问题 I have a neural network, from a tf.data data generator and a tf.keras model, as follows (a simplified version-because it would be too long): dataset = ... A tf.data.Dataset object that with the next_x method calls the get_next for the x_train iterator and for the next_y method calls the get_next for the y_train iterator. Each label is a (1, 67) array in one-hot form. Layers: input_tensor = tf.keras.layers.Input(shape=(240, 240, 3)) # dim of x output = tf.keras.layers.Flatten()(input_tensor)