profile
viewpoint

Ask questions ModuleNotFoundError: No module named 'tensorflow.contrib'

Have spent a couple days troubleshooting. Am getting the following error

ModuleNotFoundError: No module named 'tensorflow.contrib'

The offending line is

import tensorflow.contrib.tensorrt as trt

Here are my setup specs

Windows 10

Python 3.6.8

CUDA 10.0

cuDNN v 7.6.2

Tensorflow (gpu) 1.14.0

GeForce GTX 960M

Driver version 431.60

Intel Core i7-6700HQ 2.6 GHz*

Any feedback or troubleshooting steps appreciated!

tensorflow/tensorflow

Answer questions KabirKwatra

"In TF 1.14, TF-TRT was moved to the core from contrib.

You need to import it like this: from tensorflow.python.compiler.tensorrt import trt_convert as trt

https://github.com/tensorflow/tensorrt/blob/master/tftrt/examples/image-classification/image_classification.py#L22 "

from StackOverflow

useful!
source:https://uonfu.com/
answerer
Kabir Kwatra KabirKwatra Student California https://kwatra.me Python | Kotlin | Java | Dart | Swift | TS | Rust
Github User Rank List