research-contributions icon indicating copy to clipboard operation
research-contributions copied to clipboard

main.py: error: unrecognized arguments: --fold=0

Open BelieferQAQ opened this issue 3 years ago • 5 comments

Hello , i run your file for main.py by this command, python main.py --feature_size=32 --batch_size=1 --logdir=unetr_test --fold=0 --optim_lr=1e-4 --lrschedule=warmup_cosine --infer_overlap=0.5 --save_checkpoint --data_dir=/dataset/dataset0/

but there is a bug that "main.py: error: unrecognized arguments: --fold=0",i want to know what mean of this parameter that "fold "? thak you very much

BelieferQAQ avatar Jun 29 '22 03:06 BelieferQAQ

Hi @BelieferQAQ , which repository did you try ?

ahatamiz avatar Jun 29 '22 04:06 ahatamiz

Hi @BelieferQAQ , which repository did you try ?

UNETR,

Using the default values for hyper-parameters, the following command can be used to initiate training using PyTorch native AMP package:

python main.py
--feature_size=32
--batch_size=1
--logdir=unetr_test
--fold=0
--optim_lr=1e-4
--lrschedule=warmup_cosine
--infer_overlap=0.5
--save_checkpoint
--data_dir=/dataset/dataset0/

BelieferQAQ avatar Jul 02 '22 11:07 BelieferQAQ

In addition, I train the model myself and get the weight model Pt, then use the following command: python test. py --infer_ overlap=0.5 --data_ dir=/data1/dataset/wdDATASET/BTCV/abdomen/ --pretrained_ dir='./ pretrained_ models/' --saved_ checkpoint=ckpt --pretrained_ model_ name=model. pt The result produced an error: Unexpected key(s) in state_ dict: "epoch", "best_acc", "state_dict". I will --saved_ checkpoint=torchscript The result produced an error: PytorchStreamReader failed locating file constants. pkl: file not found Excuse me, how to solve this? Thank you very much!!

BelieferQAQ avatar Jul 02 '22 11:07 BelieferQAQ

@ahatamiz Hi, Thank you for your great work. Could you please help how I can do k-fold validation using the commands? I am facing an error saying --fold in not recognized. I am using a private dataset and not a pre-trained one. Thanks.

Jamshidhsp avatar Sep 08 '22 16:09 Jamshidhsp

Hello, I faced the same issue, and I simply think they did not provide either the version with the k-fold nor the code for ensemble evaluation. In addition, I believe ensemble evaluation is fundamental to achieve high performance.

casarinsof avatar Oct 06 '22 09:10 casarinsof