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

NameError: name 'Normalize' is not defined #42

Closed
makeitrad opened this issue Apr 26, 2022 · 3 comments
Closed

NameError: name 'Normalize' is not defined #42

makeitrad opened this issue Apr 26, 2022 · 3 comments

Comments

@makeitrad
Copy link

New crash started today using the following:

!python train.py --outdir=/content/drive/MyDrive/results/Mushrooms --cfg=stylegan3-t --data=/content/drive/MyDrive/datasets/Mushrooms/Mushrooms64
--gpus=1 --batch=32 --mirror=1 --snap 10 --batch-gpu 8 --kimg 1000 --syn_layers 10
--superres --up_factor 2 --head_layers 7
--path_stem /content/drive/MyDrive/results/Mushrooms/00001-stylegan3-t-Mushrooms32-gpus1-batch32/best_model.pkl

I tried doing a fresh pull of the repo but no love.


Setting up augmentation...
Distributing across 1 GPUs...
Setting up training phases...
Traceback (most recent call last):
File "train.py", line 336, in
main() # pylint: disable=no-value-for-parameter
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "train.py", line 321, in main
launch_training(c=c, desc=desc, outdir=opts.outdir, dry_run=opts.dry_run)
File "train.py", line 104, in launch_training
subprocess_fn(rank=0, c=c, temp_dir=temp_dir)
File "train.py", line 49, in subprocess_fn
training_loop.training_loop(rank=rank, **c)
File "/content/drive/MyDrive/colab-sg3XL/stylegan_xl/training/training_loop.py", line 232, in training_loop
loss = dnnlib.util.construct_class_by_name(device=device, G=G, G_ema=G_ema, D=D, augment_pipe=augment_pipe, **loss_kwargs) # subclass of training.loss.Loss
File "/content/drive/MyDrive/colab-sg3XL/stylegan_xl/dnnlib/util.py", line 303, in construct_class_by_name
return call_func_by_name(*args, func_name=class_name, **kwargs)
File "/content/drive/MyDrive/colab-sg3XL/stylegan_xl/dnnlib/util.py", line 298, in call_func_by_name
return func_obj(*args, **kwargs)
File "/content/drive/MyDrive/colab-sg3XL/stylegan_xl/training/loss.py", line 61, in init
self.norm = Normalize(normstats['mean'], normstats['std'])
NameError: name 'Normalize' is not defined

@xl-sr
Copy link
Contributor

xl-sr commented Apr 26, 2022

fixed 🙂

@xl-sr xl-sr closed this as completed Apr 26, 2022
@makeitrad
Copy link
Author

fixed 🙂

Thanks Axel!

@xiaoxusanheyi
Copy link

fixed 🙂

你好,请问如何修改的,是安装包的问题吗?

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