lambdacoldstorage / lambda-deep-learning-demo Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
I am following the Object Detection Tutorial, trying to Train SSD from scratch on MSCOCO
python demo/object_detection.py \
--mode=train --model_dir=~/demo/model/ssd300_mscoco \
--network=ssd300 --augmenter=ssd_augmenter --batch_size_per_gpu=16 --epochs=100 \
--dataset_dir=/mnt/data/data/mscoco --num_classes=81 --resolution=300 \
--feature_net=vgg_16_reduced --feature_net_path=demo/model/VGG_16_reduce/VGG_16_reduce.p \
train_args --learning_rate=0.001 --optimizer=momentum --piecewise_boundaries=60,80 \
--piecewise_lr_decay=1.0,0.1,0.01 --dataset_meta=train2014,valminusminival2014 \
--callbacks=train_basic,train_loss,train_speed,train_summary \
--skip_l2_loss_vars=l2_norm_scaler --summary_names=loss,learning_rate,class_losses,bboxes_losses
Which version of Tensorflow do I need to use for this tutorial? I tried both 1.0.0 & 1.11.0 in Python2.7 virtual environments.
>>> tensorflow.version
'1.11.0'
loading annotations into memory...
Done (t=9.26s)
creating index...
index created!
loading annotations into memory...
Done (t=7.51s)
creating index...
index created!
Traceback (most recent call last):
File "demo/object_detection.py", line 134, in <module>
main()
File "demo/object_detection.py", line 130, in main
runner.run()
File "./source/runner/runner.py", line 146, in run
self.create_graph()
File "./source/runner/parameter_server_runner.py", line 132, in create_graph
reduced_ops = self.replicate_graph()
File "./source/runner/parameter_server_runner.py", line 73, in replicate_graph
batch = self.inputter.input_fn()
File "./source/inputter/object_detection_mscoco_inputter.py", line 231, in input_fn
num_parallel_calls=12)
File "/usr/lib/python2.7/dist-packages/tensorflow/python/data/ops/dataset_ops.py", line 1007, in map
return ParallelMapDataset(self, map_func, num_parallel_calls)
File "/usr/lib/python2.7/dist-packages/tensorflow/python/data/ops/dataset_ops.py", line 2248, in __init__
super(ParallelMapDataset, self).__init__(input_dataset, map_func)
File "/usr/lib/python2.7/dist-packages/tensorflow/python/data/ops/dataset_ops.py", line 2216, in __init__
map_func, "Dataset.map()", input_dataset)
File "/usr/lib/python2.7/dist-packages/tensorflow/python/data/ops/dataset_ops.py", line 1473, in __init__
self._function.add_to_graph(ops.get_default_graph())
File "/usr/lib/python2.7/dist-packages/tensorflow/python/framework/function.py", line 479, in add_to_graph
self._create_definition_if_needed()
File "/usr/lib/python2.7/dist-packages/tensorflow/python/framework/function.py", line 335, in _create_definition_if_needed
self._create_definition_if_needed_impl()
File "/usr/lib/python2.7/dist-packages/tensorflow/python/framework/function.py", line 344, in _create_definition_if_needed_impl
self._capture_by_value, self._caller_device)
File "/usr/lib/python2.7/dist-packages/tensorflow/python/framework/function.py", line 865, in func_graph_from_py_func
outputs = func(*func_graph.inputs)
File "/usr/lib/python2.7/dist-packages/tensorflow/python/data/ops/dataset_ops.py", line 1411, in tf_data_structured_function_wrapper
ret = func(*nested_args)
File "./source/inputter/object_detection_mscoco_inputter.py", line 230, in <lambda>
image_id, file_name, classes, boxes),
File "./source/inputter/object_detection_mscoco_inputter.py", line 208, in parse_fn
speed_mode=False)
File "./source/augmenter/ssd_augmenter.py", line 532, in augment
speed_mode=speed_mode)
File "./source/augmenter/ssd_augmenter.py", line 418, in preprocess_for_train
image, boxes = random_zoom_out(image, boxes)
File "./source/augmenter/ssd_augmenter.py", line 283, in random_zoom_out
uniform_random = tf.random.uniform([], 0, 1.0, seed=seed)
AttributeError: 'module' object has no attribute 'random'
Following the tutorial here: https://lambda-deep-learning-demo.readthedocs.io/en/latest/tutorial/ssd.html and I tried to train SSD and I get an error in the ssd_common.py script:
Traceback (most recent call last): File "demo/image/object_detection.py", line 134, in <module> main() File "demo/image/object_detection.py", line 108, in main "source.network." + modeler_config.network) File "/home/srdc/anaconda3/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 728, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "./source/network/ssd300.py", line 26, in <module> INPUT_DIM) File "./source/network/detection/ssd_common.py", line 102, in get_anchors for ratio in xrange(min_size_ratio, max_size_ratio + 1, step): NameError: name 'xrange' is not defined
What should I do to get the training step complete?
I am trying to run a video and perform inference. I am unable to do that.
i am getting this error on tf1.12 gpu
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.