C3W4 Assignment: Creating Model question

Hi everyone.
While this model is being created to run the history, this error gets to me.


TypeError Traceback (most recent call last)
in ()
1 # Get the untrained model
----> 2 model = create_model(total_words, max_sequence_len)
3
4 # Train the model
5 history = model.fit(features, labels, epochs=50, verbose=1)

1 frames
/usr/local/lib/python3.7/dist-packages/keras/layers/embeddings.py in init(self, input_dim, output_dim, embeddings_initializer, embeddings_regularizer, activity_regularizer, embeddings_constraint, mask_zero, input_length, **kwargs)
125 else:
126 kwargs[‘input_shape’] = (None,)
→ 127 if input_dim <= 0 or output_dim <= 0:
128 raise ValueError(
129 'Both input_dim and output_dim should be positive, ’

TypeError: ‘<=’ not supported between instances of ‘NoneType’ and ‘int’

Has anyone seen this? I would appreciate the comment and any help.

Thanks, Anthony

This error says that either input_dim or output_dim or both are not integer typer so the <= cannot be performed. Check those variables you must be doing something wrong in their calculation.