Code Monkey home page Code Monkey logo

tensorflow-alexnet-model's People

Contributors

huanzhang12 avatar kratzert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tensorflow-alexnet-model's Issues

'list' object has no attribute 'device'

Every time I try to run dump_pb.py I obtain the following error (and I tried in two different machines)

'list' object has no attribute 'device'

Any ideas how to fix it, thanks!

ValueError: Attempted to map inputs that were not found in graph_def: [input:0]

I am using the alexnet_frozen.pb and

Repro code

pbName = "alexnet_frozen.pb"
with gfile.FastGFile(pbName, "rb") as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())

tf.logging.info("Starting execution")
gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.50)
#gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.67)
tf.reset_default_graph()
g = tf.Graph()
outlist = []
with g.as_default():
inc=tf.constant(dummy_input, dtype=tf.float32)
dataset=tf.data.Dataset.from_tensors(inc)
dataset=dataset.repeat()
iterator=dataset.make_one_shot_iterator()
next_element=iterator.get_next()
out = tf.import_graph_def(
graph_def=gdef,
input_map={"input":next_element},
return_elements=["Softmax"]
)

Error

Traceback (most recent call last):
File "test_TF_TensorRT_Prediction_GPU.py", line 169, in
speed = score(gDef, batch_size, dummy_input, strRetElements, num_loops)
File "test_TF_TensorRT_Prediction_GPU.py", line 80, in score
return_elements=[strRetElements]
File "/local/Anaconda3/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 432, in new_func
return func(*args, **kwargs)
File "/local/Anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 777, in import_graph_def
% ', '.join(absent_input_keys))
ValueError: Attempted to map inputs that were not found in graph_def: [input:0]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.