Skip to content

How to specify data paths for training and testing? #990

Answered by diazandr3s
Minxiangliu asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Minxiangliu,

As @SachidanandAlle suggested, you just need to pass a list of dict. No need to modify the self-created JSON file.

Here is an example of a user-defined validation set: https://github.com/Project-MONAI/MONAILabel/blob/testsMICCAI/sample-apps/deepedit_multilabel/lib/train.py#L242-L256 - you should define a similar method in the training file of your app.

Regarding this error:

ValueError: num_samples should be a positive integer value, but got num_samples=0

It is because there are no training samples.

I hope this helps,

Replies: 5 comments 5 replies

Comment options

You must be logged in to vote
1 reply
Comment options

You must be logged in to vote
0 replies
Answer selected by Minxiangliu
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@diazandr3s
Comment options

Comment options

You must be logged in to vote
3 replies
@diazandr3s
Comment options

@Minxiangliu
Comment options

@diazandr3s
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants