Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20240814 fix strat split #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

buffalotheory
Copy link

Running coco_data_split.py with the --how='stratified' option resulted in a ZeroDivisionError exception. This pull request is a proposed fix.

python3 coco_data_split.py --how='stratified' --data_path=../dataset/netcdf --coco_path=./coco_files/ --prefix=stratified_30 --num_patches=30 --seed=16
Traceback (most recent call last):
  File "/Users/iahansen/admin/master_study/P7/repo/Sen4AgriNet/s4am2/coco_data_split.py", line 200, in <module>
    new_train_r = (args.num_patches * train_r) / all_patches
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
ZeroDivisionError: division by zero

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant