Doubt in Assignment 2 week 2

{moderator edit - solution code removed}

In this function how is it working without using tfl. for RandomFlip() and RandomRotation(). If instead of this image I do like .add( tfl.RandomFlip(“horizontal”) ) it shows error “module ‘tensorflow.keras.layers’ has no attribute ‘RandomFlip’”. But in the documentation it’s used with tfl. or layers.

Hey @Chinmay_Sahoo,
This is due to the difference in the versions of Tensorflow. The Coursera Labs are running on Tensorflow 2.3.x, and the docs that you are checking out are of version 2.8.x. You can check out the 2.3.x docs for Random Flip here. You will find the docs for this version to be consistent with what has been used in Coursera Labs. I hope it helps.