AttributeError: 'module' object has no attribute 'from_tensorflow_frozen_model'

I get following error with the below code

import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data

import tensorrt as trt
from tensorrt.parsers import uffparser

import pycuda.driver as cuda
import pycuda.autoinit
import numpy as np
from random import randint # generate a random test case
from PIL import Image
from matplotlib.pyplot import imshow #to show test case
import time #import system tools
import os

import uff

uff_model = uff.from_tensorflow_frozen_model('./rcnn_3chan.pb', ['image_tensor','detection_scores','detection_boxes' ,'detection_classes' ,'num_detections'])

parser.register_output("image_tensor")
parser.register_output("detection_scores")
parser.register_output("detection_boxes")
parser.register_output("detection_classes")
parser.register_output("num_detections")
WARNING:tensorflow:From /usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/datasets/base.py:198: retry (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version.
Instructions for updating:
Use the retry module or similar alternatives.
Traceback (most recent call last):
  File "uff.py", line 5, in <module>
    import tensorrt as trt
  File "/usr/local/lib/python2.7/dist-packages/tensorrt/__init__.py", line 77, in <module>
    from tensorrt import infer, parsers, utils, lite, plugins
  File "/usr/local/lib/python2.7/dist-packages/tensorrt/utils/__init__.py", line 53, in <module>
    from ._utils import *
  File "/usr/local/lib/python2.7/dist-packages/tensorrt/utils/_utils.py", line 59, in <module>
    import uff
  File "/home/fts/Downloads/Amruta/uff.py", line 20, in <module>
    uff_model = uff.from_tensorflow_frozen_model('./rcnn_3chan.pb', ['image_tensor','detection_scores','detection_boxes' ,'detection_classes' ,'num_detections'])
AttributeError: 'module' object has no attribute 'from_tensorflow_frozen_model'

my ENV in bashrc:

export PATH=$PATH:/usr/local/cuda-9.0/bin/:/home/fts/Downloads/TensorRT-3.0.4/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/fts/Downloads/TensorRT-3.0.4/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-9.0/lib64:/usr/local/lib/x86_64-linux-gnu:/usr/local/cuda-9.0/lib64:/usr/local/lib/x86_64-linux-gnu
export CUDA_ROOT=/usr/local/cuda-9.0
export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export CUDA_HOME=/usr/local/cuda-9.0
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/extras/CUPTI/lib64

I had named my py file as uff (New to python )

Hi,

Please rename your file to differ from ‘uff’.

The uff module is our TensorRT library name.
An identical file name will cause some conflict and didn’t load the expected Uff module correctly.

Thanks.

When I was trying to convert .pb to .uff I am getting this error.
AttributeError: module ‘uff’ has no attribute ‘from_tensorflow_frozen_model’