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

Training process #23

Open
ananas1178 opened this issue Aug 10, 2022 · 2 comments
Open

Training process #23

ananas1178 opened this issue Aug 10, 2022 · 2 comments

Comments

@ananas1178
Copy link

ananas1178 commented Aug 10, 2022

I was trying to train for the first time using the example:

"python train.py --name cat_train_5 --batch 16 --dataroot_sketch ./data/sketch/by_author/cat --dataroot_image ./data/image/cat --l_image 0.7 - -g_pretrained ./pretrained/stylegan2-cat/netG.pth --d_pretrained ./pretrained/stylegan2-cat/netD.pth --max_iter 150000 --disable_eval --diffaug_policy translation --no_wandb"

And everything seems to be fine:

Using pretrained weight for D1...
Using pretrained weight for D_image...
----------------- Options ---------------
batch: 16 [default: 4]
beta1: 0.0
beta2: 0.99
channel_multiplier: 2
checkpoints_dir: checkpoint
d_pretrained: ./pretrained/stylegan2-cat/netD.pth [default: ]
d_reg_every: 16
dataroot_image: ./data/image/cat [default: None]
dataroot_sketch: ./data/sketch/by_author/cat [default: None]
diffaug_policy: translation [default: ]
disable_eval: True [default: False]
display_freq: 2500
display_winsize: 400
dsketch_no_pretrain: False
eval_batch: 50
eval_dir: None
eval_freq: 5000
g_pretrained: ./pretrained/stylegan2-cat/netG.pth [default: ]
gan_mode: softplus
isTrain: True [default: None]
l_image: 0.7 [default: 0]
l_weight: 0
latent_avg_samples: 8192
lr: 0.002
lr_mlp: 0.01
max_epoch: 1000000
max_iter: 150000 [default: 75001]
mixing: 0.9
n_mlp: 8
name: cat_train_5 [default: None]
no_d_regularize: False
no_html: False
no_wandb: True [default: False]
optim_param_g: style
photosketch_path: ./pretrained/photosketch.pth
print_freq: 100
r1: 10
reduce_visuals: False
resume_iter: None
save_freq: 2500
size: 256
sketch_channel: 1
transform_fake: toSketch,to3ch
transform_real: to3ch
use_cpu: False
z_dim: 512
----------------- End -------------------

-------------- Trainables ---------------
(G trainable parameters)
style.1.weight
style.1.bias
style.2.weight
style.2.bias
style.3.weight
style.3.bias
style.4.weight
style.4.bias
style.5.weight
style.5.bias
style.6.weight
style.6.bias
style.7.weight
style.7.bias
style.8.weight
style.8.bias
----------------- End -------------------
create web directory checkpoint\cat_train_5\web...
Training was successfully finished.

I expected that the weights would be generated in the checkpoint folder and then used to generate the images, but I only found two files "ops" and "log_loss" which is empty.

I am running this on Windows 10.

The process is correct? have I forgotten something? Could it be that the problem is OS?

I'm new working with gans, so any help will be appreciated.

@PeterWang512
Copy link
Owner

Unfortunately, I've never tested this code on Windows, and this is the first time I see this issue. And yes the weights should be generated in the checkpoint folder, and it seems like the for loops in train.py are skipped for some reason (it should print out some loss values in the output). How long does it take for the training script to end?

@tobiasgg
Copy link

tobiasgg commented Jan 21, 2023

@ananas1178 @PeterWang512 Did you ever manage to solve this issue? I am experiencing the same thing... I am using Google Colab.

EDIT: Think I found the issue: This happened to me when the number of batches (specified by --batch) were larger than the amount of input sketches.

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

3 participants