简体   繁体   中英

Tensorflow > ModuleNotFoundError: No module named 'tensorflow.contrib'

Have spent a couple days troubleshooting. This is the complete installation guide for a course I am taking

https://github.com/reigngt09/Pose-Estimation/tree/master/1.%20Pose%20Estimation%20Installation%20Guide

When I try and enter the following in cmd

$python run_webcam.py --camera video.mp4

I get 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!

You can try to import the following way:

from tensorflow.python.compiler.tensorrt import trt_convert as trt

https://docs.nvidia.com/deeplearning/frameworks/tf-trt-user-guide/index.html#usage-example

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM