cryu854 / stylegan2 Goto Github PK
View Code? Open in Web Editor NEW"Analyzing and Improving the Image Quality of StyleGAN" in TensorFlow 2
"Analyzing and Improving the Image Quality of StyleGAN" in TensorFlow 2
I have been trying to get this repo to work but I am running into an issue. After cloning this repo and downloading the afhq dataset, I attemp to run the code using this command:
python main.py train --dataset_name afhq --dataset_path C:\Users\user\Documents\ATR\data\afhq --batch_size 4 --res 512 --config e --impl ref
Once training starts, however, I get an error returned:
`
Traceback (most recent call last):
File "main.py", line 99, in
main()
File "main.py", line 66, in main
trainer.train()
File "C:\Users\user\Documents\GitHub\StyleGAN2\train.py", line 150, in train
G_loss, D_loss = self.train_step(real_images, real_labels)
File "C:\Users\user\AppData\Local\Continuum\anaconda3\envs\capsule\lib\site-packages\tensorflow\python\eager\def_function.py", line 780, in call
result = self._call(*args, **kwds)
File "C:\Users\user\AppData\Local\Continuum\anaconda3\envs\capsule\lib\site-packages\tensorflow\python\eager\def_function.py", line 823, in _call
self._initialize(args, kwds, add_initializers_to=initializers)
File "C:\Users\user\AppData\Local\Continuum\anaconda3\envs\capsule\lib\site-packages\tensorflow\python\eager\def_function.py", line 696, in _initialize
self._stateful_fn._get_concrete_function_internal_garbage_collected( # pylint: disable=protected-access
File "C:\Users\user\AppData\Local\Continuum\anaconda3\envs\capsule\lib\site-packages\tensorflow\python\eager\function.py", line 2855, in _get_concrete_function_internal_garbage_collected
graph_function, _, _ = self._maybe_define_function(args, kwargs)
File "C:\Users\user\AppData\Local\Continuum\anaconda3\envs\capsule\lib\site-packages\tensorflow\python\eager\function.py", line 3213, in _maybe_define_function
graph_function = self._create_graph_function(args, kwargs)
File "C:\Users\user\AppData\Local\Continuum\anaconda3\envs\capsule\lib\site-packages\tensorflow\python\eager\function.py", line 3065, in _create_graph_function
func_graph_module.func_graph_from_py_func(
File "C:\Users\user\AppData\Local\Continuum\anaconda3\envs\capsule\lib\site-packages\tensorflow\python\framework\func_graph.py", line 986, in func_graph_from_py_func
func_outputs = python_func(*func_args, **func_kwargs)
File "C:\Users\user\AppData\Local\Continuum\anaconda3\envs\capsule\lib\site-packages\tensorflow\python\eager\def_function.py", line 600, in wrapped_fn
return weak_wrapped_fn().wrapped(*args, **kwds)
File "C:\Users\user\AppData\Local\Continuum\anaconda3\envs\capsule\lib\site-packages\tensorflow\python\eager\function.py", line 3735, in bound_method_wrapper
return wrapped_fn(*args, **kwargs)
File "C:\Users\user\AppData\Local\Continuum\anaconda3\envs\capsule\lib\site-packages\tensorflow\python\framework\func_graph.py", line 973, in wrapper
raise e.ag_error_metadata.to_exception(e)
ValueError: in user code:
C:\Users\user\Documents\GitHub\StyleGAN2\train.py:209 train_step *
G_loss, G_reg = self.loss_func.get_G_loss(real_images, real_labels, compute_reg=True)
C:\Users\user\Documents\GitHub\StyleGAN2\modules\losses.py:71 get_G_loss *
pl_lengths = tf.math.sqrt(tf.reduce_mean(tf.reduce_sum(tf.square(pl_grads), axis=2), axis=1))
C:\Users\user\AppData\Local\Continuum\anaconda3\envs\capsule\lib\site-packages\tensorflow\python\ops\gen_math_ops.py:10321 square **
_, _, _op, _outputs = _op_def_library._apply_op_helper(
C:\Users\user\AppData\Local\Continuum\anaconda3\envs\capsule\lib\site-packages\tensorflow\python\framework\op_def_library.py:486 _apply_op_helper
raise ValueError(
ValueError: Tried to convert 'x' to a tensor and failed. Error: None values not supported.
`
Hello, the link for the model of perceptual metric is not working can you please update it?
https://drive.google.com/u/2/uc?id=12qqzTA2HGM50Qnt12FYyjgL6p4nl5bNZ&export=download
tf.keras.utils.get_file( 'lpips.h5','https://drive.google.com/u/2/uc?id=12qqzTA2HGM50Qnt12FYyjgL6p4nl5bNZ&export=download',cache_subdir='weights-lpips') # Store at ~/.keras/weights-lpips
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.