huanzhang12 / tensorflow-alexnet-model Goto Github PK
View Code? Open in Web Editor NEWPretrained TensorFlow protobuf for AlexNet model
License: BSD 3-Clause "New" or "Revised" License
Pretrained TensorFlow protobuf for AlexNet model
License: BSD 3-Clause "New" or "Revised" License
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!
I am using the alexnet_frozen.pb and
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"]
)
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]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.