Skip to content

python loc2vec.py -> ValueError: num_samples should be a positive integer value, but got num_samples=0 #6

@raphael10-collab

Description

@raphael10-collab
(loc2vec) root@WorldMap:~/VectorEmbeddingsFromGeoCoordinates/loc2vec# python loc2vec.py 
0
Traceback (most recent call last):
  File "loc2vec.py", line 86, in <module>
    main()
  File "loc2vec.py", line 56, in main
    train_sampler = WeightedRandomSampler(weights , len(dset_train))
  File "/root/anaconda3/envs/loc2vec/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 123, in __init__
    "value, but got num_samples={}".format(num_samples))
ValueError: num_samples should be a positive integer value, but got num_samples=0
(loc2vec) root@WorldMap:~/VectorEmbeddingsFromGeoCoordinates/loc2vec# 

OS: Ubuntu 24.04
python: Python 3.7.3

How to make it work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions