-
Notifications
You must be signed in to change notification settings - Fork 9
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
Training the problem #6
Comments
I use the command like this: |
Hi, can you tell me how many images you are using for your test image? |
train is 130 images val is 32 images but my use AFHQ dataset appear error ValueError: range() arg 3 must not be zero |
train AFHQ dataset is 19999 epoch appear error |
I see. Can you share the command used for AFHQ dataset? I will reproduce it myself. By the way, due to the use of SwAV, I recommend to use batch size larger than 4 (16 will be enough). Also, 130 images may not be enough if you are training a model from scratch. |
I use AFHQ dataset order is your use metrics order not appear error ? is error *C:\Users\yuanx.conda\envs\style2\lib\site-packages\torch\utils\cpp_extension.py:322: UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。 |
Note that custom CUDA kernel only works on Linux. It seems that you are using Windows. |
Does the command need to be modified |
The equipment is not enough, the use of less than 16batchsize will affect the effect |
You can use In general, the larger the batch size, the better. I haven't tested the code with batch size smaller than 16, so I can't tell you the results of smaller batch sizes. |
train is --mod_type=adain no problem,The metrics use readme command is faulty |
This is not because there is a problem, but because the '--mod-type' is automatically set according to the checkpoint used. Checkpoint 'afhq-stylegan2-5M.pt ' is the model trained using |
thank you for the response,Try to WSL |
Hello, there is a cutoff in the training data 999 epoch Evaluating k-NN accuracy. appear error:ValueError: range() arg 3 must not be zero but my train afhq datasets likewise error :ValueError: range() arg 3 must not be zero
**Traceback (most recent call last):
File "train.py", line 258, in
File "train.py", line 254, in main
File "train.py", line 190, in training_loop
File "C:\Users\yuanx.conda\envs\style2\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "C:\Users\yuanx\Desktop\style\style-aware-discriminator\metrics\knn_evaluator.py", line 69, in evaluate
top1, top5 = knn_classifier(
File "C:\Users\yuanx.conda\envs\style2\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, kwargs)
File "C:\Users\yuanx\Desktop\style\style-aware-discriminator\metrics\knn_evaluator.py", line 106, in knn_classifier
for idx in range(0, num_test_images, imgs_per_chunk):
ValueError: range() arg 3 must not be zero
this is my print
num_test_images, num_chunks = test_labels.shape[0], 100
num_test_images = 32;
imgs_per_chunk = num_test_images // num_chunks
imgs_per_chunk = 0
environment:torch=1.11.0+cu113 cuda=11.3
The text was updated successfully, but these errors were encountered: