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

Train tgnet_fps and find the error #32

Open
Frq-F opened this issue Apr 23, 2024 · 4 comments
Open

Train tgnet_fps and find the error #32

Frq-F opened this issue Apr 23, 2024 · 4 comments

Comments

@Frq-F
Copy link

Frq-F commented Apr 23, 2024

Hello, when I train the tgnet_fps model, I got following error
Traceback (most recent call last):
File "start_train.py", line 51, in
runner(config, model)
File "/workspace/ToothGroupNetwork-main/ToothGroupNetwork-main/runner.py", line 53, in runner
gen_set = [get_generator_set(config["generator"], False)]
File "/workspace/ToothGroupNetwork-main/ToothGroupNetwork-main/runner.py", line 28, in get_generator_set
point_loader = DataLoader(
File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 268, in init
sampler = RandomSampler(dataset, generator=generator)
File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/sampler.py", line 102, in init
raise ValueError("num_samples should be a positive integer "
ValueError: num_samples should be a positive integer value, but got num_samples=0

How to solve this issue? By the way , I use the challange dataset.

@Frq-F Frq-F changed the title Train tgnet_fps and find a bug Train tgnet_fps and find the error Apr 23, 2024
@Frq-F
Copy link
Author

Frq-F commented Apr 23, 2024

My base_name_train_fold.txt belike
00OMSZGW_lower_lower_sampled_points.npy
00OMSZGW_upper_upper_sampled_points.npy
01328DDN_lower_lower_sampled_points.npy......
Is that right? or it should contain input_data_dir_path

@Frq-F
Copy link
Author

Frq-F commented Apr 23, 2024

I modify the code ,change the parameter of shuffle from true to false,solve this issue。
point_loader = DataLoader(
DentalModelGenerator(
config["input_data_dir_path"],
aug_obj_str=config["aug_obj_str"],
split_with_txt_path=config["train_data_split_txt_path"]
),
shuffle=False,
batch_size=config["train_batch_size"],
collate_fn=collate_fn
)
But my data path is not set right, the train_set=0, validation_set=0.
My input_data_dir_path is set to the folder where data is stored,and txt file belike
00OMSZGW_lower_lower_sampled_points.npy
00OMSZGW_upper_upper_sampled_points.npy
01328DDN_lower_lower_sampled_points.npy......

@Frq-F
Copy link
Author

Frq-F commented Apr 23, 2024

I solve the problem ,txt file should be like
01328DDN

@ericnlt
Copy link

ericnlt commented Apr 25, 2024

I solve the problem ,txt file should be like 01328DDN

What's your video card? How long did it take to train tgnet_fps?

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

No branches or pull requests

2 participants