0
$\begingroup$

I'm just getting started with GANs and have prepared a dataset for Stylegan of around 5500 256x256 images to train it on. I've pored through the scant resources outlining the training process and have all of the software set up, using pretty much default settings for the training.py and training_loop.py files aside from specifying GPU number and dataset paths.

When I run the train.py script it runs for a single tick every time before giving me this error about input depths vs filter depths. These don't seem to be settings in Stylegan so I don't really know how to troubleshoot the issue. I've tried changing many different params in the training files and it always fails after one tick. Do these errors look familiar to anyone? My dataset seems like it shouldn't cause any issues.

Traceback (most recent call last): 
File "/home/futureprojects/anaconda3/envs/tf-gpu/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1356, in _do_call
return fn(*args)
File "/home/futureprojects/anaconda3/envs/tf-gpu/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1341, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File "/home/futureprojects/anaconda3/envs/tf-gpu/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1429, in _call_tf_sessionrun run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found.(0) Invalid argument: input depth must be evenly divisible by filter depth: 1 vs 3
 [[{{node InceptionV3/_Run/InceptionV3/InceptionV3/import/conv/Conv2D}}]]
 [[InceptionV3/_Run/InceptionV3/Reshape/_4879]]
(1) Invalid argument: input depth must be evenly divisible by filter depth: 1 vs 3
 [[{{node InceptionV3/_Run/InceptionV3/InceptionV3/import/conv/Conv2D}}]]
0 successful operations.
0 derived errors ignored.

I haven't been able to make much sense of it from what I've read of Tensorflow's docs yet.

$\endgroup$
1
$\begingroup$

After further trial and error, it seems that commenting out the lines using the "metrics" object in Stylegan's training_loop.py script on lines 207, 264, and 267 have resolved the crashing issue.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.