balancap / SSD-Tensorflow

Single Shot MultiBox Detector in TensorFlow
4.11k stars 1.89k forks source link

Error when running the demo codes #4

Closed LevinJ closed 7 years ago

LevinJ commented 7 years ago

Hi @balancap , with tensorflow 1.0 installed, I tried running the "Minimal example" codes posted in here https://github.com/balancap/SSD-Tensorflow. I had an "unexpected keyword argument 'partition_info'" error.

File "/home/levin/.p2/pool/plugins/org.python.pydev_5.4.0.201611281236/pysrc/pydevd.py", line 1537, in globals = debugger.run(setup['file'], None, None, is_module) File "/home/levin/.p2/pool/plugins/org.python.pydev_5.4.0.201611281236/pysrc/pydevd.py", line 976, in run pydev_imports.execfile(file, globals, locals) # execute the script File "/home/levin/.p2/pool/plugins/org.python.pydev_5.4.0.201611281236/pysrc/_pydev_imps/_pydev_execfile.py", line 25, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "/home/levin/workspace/detection/SSD-Tensorflow/notebooks/ssd_demo.py", line 20, in predictions, localisations, logits, end_points = ssd.net(image_4d, is_training=False) File "/home/levin/workspace/detection/SDC-Vehicle-Detection/nets/ssd_vgg_300.py", line 128, in net scope=scope) File "/home/levin/workspace/detection/SDC-Vehicle-Detection/nets/ssd_vgg_300.py", line 394, in ssd_net net = slim.repeat(inputs, 2, slim.conv2d, 64, [3, 3], scope='conv1') File "/home/levin/anaconda3/lib/python3.5/site-packages/tensorflow/contrib/layers/python/layers/layers.py", line 1720, in repeat outputs = layer(outputs, *args, kwargs) File "/home/levin/anaconda3/lib/python3.5/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 177, in func_with_args return func(*args, current_args) File "/home/levin/anaconda3/lib/python3.5/site-packages/tensorflow/contrib/layers/python/layers/layers.py", line 907, in convolution outputs = layer.apply(inputs) File "/home/levin/anaconda3/lib/python3.5/site-packages/tensorflow/python/layers/base.py", line 303, in apply return self.call(inputs, kwargs) File "/home/levin/anaconda3/lib/python3.5/site-packages/tensorflow/python/layers/base.py", line 269, in call self.build(input_shapes[0]) File "/home/levin/anaconda3/lib/python3.5/site-packages/tensorflow/python/layers/convolutional.py", line 145, in build dtype=self.dtype) File "/home/levin/anaconda3/lib/python3.5/site-packages/tensorflow/python/ops/variable_scope.py", line 988, in get_variable custom_getter=custom_getter) File "/home/levin/anaconda3/lib/python3.5/site-packages/tensorflow/python/ops/variable_scope.py", line 890, in get_variable custom_getter=custom_getter) File "/home/levin/anaconda3/lib/python3.5/site-packages/tensorflow/python/ops/variable_scope.py", line 341, in get_variable validate_shape=validate_shape) File "/home/levin/anaconda3/lib/python3.5/site-packages/tensorflow/python/layers/base.py", line 258, in variable_getter variable_getter=functools.partial(getter, *kwargs)) File "/home/levin/anaconda3/lib/python3.5/site-packages/tensorflow/python/layers/base.py", line 208, in _add_variable trainable=trainable and self.trainable) File "/home/levin/anaconda3/lib/python3.5/site-packages/tensorflow/contrib/layers/python/layers/layers.py", line 1310, in layer_variable_getter return _model_variable_getter(getter, args, kwargs) File "/home/levin/anaconda3/lib/python3.5/site-packages/tensorflow/contrib/layers/python/layers/layers.py", line 1299, in _model_variable_getter custom_getter=getter) File "/home/levin/anaconda3/lib/python3.5/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 177, in func_with_args return func(*args, *current_args) File "/home/levin/anaconda3/lib/python3.5/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 268, in model_variable partitioner=partitioner, custom_getter=custom_getter) File "/home/levin/anaconda3/lib/python3.5/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 177, in func_with_args return func(args, **current_args) File "/home/levin/anaconda3/lib/python3.5/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 225, in variable partitioner=partitioner) File "/home/levin/anaconda3/lib/python3.5/site-packages/tensorflow/python/ops/variable_scope.py", line 333, in _true_getter caching_device=caching_device, validate_shape=validate_shape) File "/home/levin/anaconda3/lib/python3.5/site-packages/tensorflow/python/ops/variable_scope.py", line 684, in _get_single_variable validate_shape=validate_shape) File "/home/levin/anaconda3/lib/python3.5/site-packages/tensorflow/python/ops/variables.py", line 226, in init expected_shape=expected_shape) File "/home/levin/anaconda3/lib/python3.5/site-packages/tensorflow/python/ops/variables.py", line 303, in _init_from_args initial_value(), name="initial_value", dtype=dtype) File "/home/levin/anaconda3/lib/python3.5/site-packages/tensorflow/python/ops/variable_scope.py", line 673, in shape.as_list(), dtype=dtype, partition_info=partition_info) TypeError: init() got an unexpected keyword argument 'partition_info'

balancap commented 7 years ago

Thanks for noticing the bugs! The code base has been quite unstable lately, I forgot to check this basic example was running well. Hopefully, things should settle down now.

I just replaced this simple example by a simple Jupyter notebook with updated methods. I hope it will work well for you :)