C2W2 create_model

im a new pythoner, please do me a favor below :slight_smile:
# Get the augmentation layers (or model) from your earlier function
augmentation_layers = create_augmentation_model()

# Don't forget to add the augmentation layers! These usually go right after the Input!
model = tf.keras.models.Sequential([ 
	augmentation_layers,,
            create_model
]) 

and i got a error below
ValueError: Only instances of keras.Layer can be added to a Sequential model. Received: <function create_model at 0x7f951c7af920> (of type <class ‘function’>)

posting codes is against community guidelines

I don’t recognize this code as being part of DLS C4 (ConvNets). I’m guessing it must be from one of the TF specializations. Please edit the title using the little “edit pencil” to move it to the correct course category.

So I don’t know this exercise, but just looking at what you show, note that the first live code in create_model is just a list of instantiated layers, but you haven’t assigned that to anything. So what does that code even mean? Don’t you need to wrap that list of functions with tf.keras.models.Sequential to create a function object instead of a list which there is no way to reference?

If you’re new to python, you’ve jumped into the deep end of the swimming pool here. We’re doing Object Oriented Programming at a pretty high level here: you have to understand the definitions of all the TF/Keras classes that you are using here, even over and above knowing the python syntax. Have you programmed in any other languages that support OOP (Java, C++)? If not, it might be a good idea to take a python course first, unless you have a very high tolerance for frustration. :nerd_face:

1 Like

this is from tensorflow developer course, @derek please be careful while posting topic. for better understanding refer faq section on how to post. Please take a screenshot of the error and post that when you encounter any issue, or in case you have a different output than expected you can share that too but without sharing Any grade cell codes

2 Likes

for code line where you are suppose to add augmentation layer, you have added create model which is incorrect here.

Actually you seem to have added more code line, please get a fresh copy and redo the assignment.

Also please make sure to write only codes as per instructed, do not add any extra codes especially between assigned markers ###START AND END CODE HERE###

1 Like

so grateful for your kindly and helpful suggestions.
i will retry it.
thank again. :slight_smile:

2 Likes

i passed C2W2 , coz your wonderful reminder.

1 Like