philjd / generalize_spatial_relations Goto Github PK
View Code? Open in Web Editor NEWCode for the paper "Optimization Beyond the Convolution: Generalizing Spatial Relations with End-to-End Metric Learning" (ICRA 2018)
License: Apache License 2.0
Code for the paper "Optimization Beyond the Convolution: Generalizing Spatial Relations with End-to-End Metric Learning" (ICRA 2018)
License: Apache License 2.0
My enviroment is Ubuntu 20.04 NVIDIA GeForce RTX 3090
CUDA==11.6
tensorflow==2.9.1
and I change
import tensorflow as tf
to
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
I use CUDA_VISIBLE_DEVICES=0 python3 train.py --logdir=./log --data_dir=~/桌面/dataset/FreiburgSpatialRelationsDataset/object-models -- more_augmention=True --train_on_all_data=True
and
CUDA_VISIBLE_DEVICES=0 python3 train.py --logdir=./log --data_dir=~/桌面/dataset/FreiburgSpatialRelationsDataset/object-models -- more_augmention=True
to train the model, but I have this problem :
/home/darkplume/桌面/git/generalize_spatial_relations/SpatialRelationCNN/model/evaluation_metrics.py:84: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
knn_labels = similarity_matrix[index][:, :k]
Traceback (most recent call last):
File "train.py", line 211, in <module>
tf.app.run(main=main, argv=[sys.argv[0]] + unparsed)
File "/home/darkplume/.local/lib/python3.8/site-packages/tensorflow/python/platform/app.py", line 36, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/home/darkplume/.local/lib/python3.8/site-packages/absl/app.py", line 308, in run
_run_main(main, args)
File "/home/darkplume/.local/lib/python3.8/site-packages/absl/app.py", line 254, in _run_main
sys.exit(main(argv))
File "train.py", line 164, in main
evaluate(model, sess, input_layer, labels, split_index, "test",
File "train.py", line 126, in evaluate
acc = metrics.knn_accuracy(dist_mat, similarity_mat, k, x_of_k)
File "/home/darkplume/桌面/git/generalize_spatial_relations/SpatialRelationCNN/model/evaluation_metrics.py", line 84, in knn_accuracy
knn_labels = similarity_matrix[index][:, :k]
ValueError: could not broadcast input array from shape (135,1) into shape (135,)
So what's wrong with my process? Maybe somebody can help me with this ?
Many thanks!
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.