@Swati_Zambre Did you try the following way of importing slim
!pip install tf_slim
import tf_slim as slim

Check this response 109 for more details. Thanks!
Share a standalone code to reproduce your error. Thanks!