Facing an error while generating features

When i am trying to get the encoded features of a random image as done in video at 7:46 , i am getting the following error. Please if you can check for the error?