Comments (13)
I use the command like this:
python train.py --mod-type adain --total-nimg 1.6M --batch-size 4 --load-size 320 --crop-size 256 --image-size 256 --train-dataset datasets/l2l_cloth/train --eval-dataset datasets/l2l_cloth/val --out-dir runs --extra-desc some descriptions
from style-aware-discriminator.
Hi, can you tell me how many images you are using for your test image?
I guess it happens when number of your validation set is less than 100.
from style-aware-discriminator.
train is 130 images val is 32 images but my use AFHQ dataset appear error ValueError: range() arg 3 must not be zero
from style-aware-discriminator.
train AFHQ dataset is 19999 epoch appear error
from style-aware-discriminator.
I see. Can you share the command used for AFHQ dataset? I will reproduce it myself.
Until the problem is fixed, you can train your model without evaluation by adding --evaluation false
to the command. You can evaluate if after training using saved checkpoints.
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.
from style-aware-discriminator.
I use AFHQ dataset order is
python train.py --mod-type adain --total-nimg 1.6M --batch-size 16 --load-size 320 --crop-size 256 --image-size 256 --train-dataset datasets/afhq/train --eval-dataset datasets/afhq/val --out-dir runs --extra-desc some descriptions
your use metrics order not appear error ?
my attempt readme order is
python -m metrics fid reconstruction --seed 123 --checkpoint ./checkpoints/afhq-stylegan2-5M.pt --train-dataset ./datasets/afhq/train --eval-dataset ./datasets/afhq/val
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] 系统找不到指定的文件。
warnings.warn(f'Error checking compiler version for {compiler}: {error}')
信息: 用提供的模式无法找到文件。
Traceback (most recent call last):
File "C:\Users\yuanx.conda\envs\style2\lib\runpy.py", line 192, in _run_module_as_main
return run_code(code, main_globals, None,
File "C:\Users\yuanx.conda\envs\style2\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\yuanx\Desktop\style\style-aware-discriminator\metrics_main.py", line 88, in
main()
File "C:\Users\yuanx\Desktop\style\style-aware-discriminator\metrics_main.py", line 70, in main
model = StyleAwareDiscriminator(opts)
File "C:\Users\yuanx\Desktop\style\style-aware-discriminator\mylib\base_model.py", line 23, in init
self._create_networks()
File "C:\Users\yuanx\Desktop\style\style-aware-discriminator\model\model.py", line 72, in create_networks
self.G = Generator(
File "C:\Users\yuanx\Desktop\style\style-aware-discriminator\model\networks\generator.py", line 42, in init
from .stylegan2_layers import EncodeBlock, StyleBlock
File "C:\Users\yuanx\Desktop\style\style-aware-discriminator\model\networks\stylegan2_layers.py", line 5, in
import model.networks.stylegan2_op as ops
File "C:\Users\yuanx\Desktop\style\style-aware-discriminator\model\networks\stylegan2_op_init.py", line 1, in
from .fused_act import FusedLeakyReLU, fused_leaky_relu
File "C:\Users\yuanx\Desktop\style\style-aware-discriminator\model\networks\stylegan2_op\fused_act.py", line 10, in
fused = load(
File "C:\Users\yuanx.conda\envs\style2\lib\site-packages\torch\utils\cpp_extension.py", line 1144, in load
return _jit_compile(
File "C:\Users\yuanx.conda\envs\style2\lib\site-packages\torch\utils\cpp_extension.py", line 1357, in _jit_compile
_write_ninja_file_and_build_library(
File "C:\Users\yuanx.conda\envs\style2\lib\site-packages\torch\utils\cpp_extension.py", line 1456, in _write_ninja_file_and_build_library
_write_ninja_file_to_build_library(
File "C:\Users\yuanx.conda\envs\style2\lib\site-packages\torch\utils\cpp_extension.py", line 1898, in _write_ninja_file_to_build_library
_write_ninja_file(
File "C:\Users\yuanx.conda\envs\style2\lib\site-packages\torch\utils\cpp_extension.py", line 2023, in _write_ninja_file
cl_paths = subprocess.check_output(['where',
File "C:\Users\yuanx.conda\envs\style2\lib\subprocess.py", line 411, in check_output
return run(popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\Users\yuanx.conda\envs\style2\lib\subprocess.py", line 512, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['where', 'cl']' returned non-zero exit status 1.
from style-aware-discriminator.
Note that custom CUDA kernel only works on Linux. It seems that you are using Windows.
from style-aware-discriminator.
Does the command need to be modified
from style-aware-discriminator.
The equipment is not enough, the use of less than 16batchsize will affect the effect
from style-aware-discriminator.
You can use --mod-type=adain
, but I cannot guarantee that it will work as I have never tested the code on Windows. I recommend you to run the code on Linux (you can use WSL if you are familiar with it).
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.
from style-aware-discriminator.
train is --mod_type=adain no problem,The metrics use readme command is faulty
from style-aware-discriminator.
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 --mod-type=stylegan2
.
from style-aware-discriminator.
thank you for the response,Try to WSL
from style-aware-discriminator.
Related Issues (8)
- Simple description of training data requirements HOT 2
- Aboutstop-gradient operation HOT 5
- Sample code for image translation HOT 1
- 版本问题 HOT 2
- 训练的epoch HOT 27
- lack count_parameters() in torch_utils.py HOT 1
- About Interpolation. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from style-aware-discriminator.