Comments (2)
Sorry for my late reply. And many thanks for your interest to our works!
The problem seems to be caused by the start value of the label of the object map. Maybe we are using a different version of the package. Starting from a certain version, the labels of the object map obtained with the slic algorithm will start from 1, not 0. Maybe you can target your code changes based on this.
Best regards,
from srgcae.
Sorry for my late reply. And many thanks for your interest to our works!
The problem seems to be caused by the start value of the label of the object map. Maybe we are using a different version of the package. Starting from a certain version, the labels of the object map obtained with the slic algorithm will start from 1, not 0. Maybe you can target your code changes based on this.
Best regards,
感谢您的工作! 当我想训练train_SRGCAE_Local.py时,出现以下错误:
Traceback (most recent call last): File "/media/meng/57673667-4363-4453-89a5-a422016a5299/Meng_forked/code/change_detection/SRGCAE/train_SRGCAE_Local.py", line 150, in <module> train_model(args) File "/media/meng/57673667-4363-4453-89a5-a422016a5299/Meng_forked/code/change_detection/SRGCAE/train_SRGCAE_Local.py", line 51, in train_model am_set_t1 = construct_affinity_matrix(img_t1, objects, args.band_width_t1) File "/media/meng/57673667-4363-4453-89a5-a422016a5299/Meng_forked/code/change_detection/SRGCAE/aux_func/graph_func.py", line 26, in construct_affinity_matrix adj_mat = gaussian_kernel_distance(sub_object, band_width=band_width) File "/media/meng/57673667-4363-4453-89a5-a422016a5299/Meng_forked/code/change_detection/SRGCAE/aux_func/graph_func.py", line 6, in gaussian_kernel_distance euc_dis = pairwise_distances(vector) File "/home/meng/anaconda3/envs/torch1.11.0/lib/python3.8/site-packages/sklearn/metrics/pairwise.py", line 2195, in pairwise_distances return _parallel_pairwise(X, Y, func, n_jobs, **kwds) File "/home/meng/anaconda3/envs/torch1.11.0/lib/python3.8/site-packages/sklearn/metrics/pairwise.py", line 1765, in _parallel_pairwise return func(X, Y, **kwds) File "/home/meng/anaconda3/envs/torch1.11.0/lib/python3.8/site-packages/sklearn/metrics/pairwise.py", line 310, in euclidean_distances X, Y = check_pairwise_arrays(X, Y) File "/home/meng/anaconda3/envs/torch1.11.0/lib/python3.8/site-packages/sklearn/metrics/pairwise.py", line 156, in check_pairwise_arrays X = Y = check_array( File "/home/meng/anaconda3/envs/torch1.11.0/lib/python3.8/site-packages/sklearn/utils/validation.py", line 969, in check_array raise ValueError( ValueError: Found array with 0 sample(s) (shape=(0, 3)) while a minimum of 1 is required by check_pairwise_arrays.
代码未做任何改动,使用的数据也是下载代码时附带的曙光数据集。请问为何会出现这个错误,该如何解决?谢谢。 我的环境: python==3.8.13 pytorch==1.11.0 scikit-learn==1.3.0 imageio=2.31.1 numpy==1.23.1 gdal==3.6.2 opencv==4.8.0
May I ask, have you solved this problem
from srgcae.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from srgcae.