Comments (5)
I am also having this same issue - TF 2.4 / CUDA 11.1
from stylegan2-tensorflow-2.0.
Did you manage to solve the issue?
from stylegan2-tensorflow-2.0.
I'm getting this error too. I'm on macOS with M1 and Tensorflow is running on GPU as a Pluggable Device. Given that @RhynoTime had this issue with CUDA, perhaps it has to do with GPU? It doesn't seem likely but not something to rule out.
I've gotten this traced back to the GAN.GMA
model. The input shapes match all of those shown in the error message, but the final input (<tf.Tensor 'IteratorGetNext:8' shape=(16, 1) dtype=float32>
) does not. For reference, here's the model summary for GAN.GMA
.
Model: "model_3"
__________________________________________________________________________________________________
Layer (type) Output Shape Param # Connected to
==================================================================================================
input_18 (InputLayer) [(None, 512)] 0
__________________________________________________________________________________________________
input_19 (InputLayer) [(None, 512)] 0
__________________________________________________________________________________________________
input_20 (InputLayer) [(None, 512)] 0
__________________________________________________________________________________________________
input_21 (InputLayer) [(None, 512)] 0
__________________________________________________________________________________________________
input_22 (InputLayer) [(None, 512)] 0
__________________________________________________________________________________________________
input_23 (InputLayer) [(None, 512)] 0
__________________________________________________________________________________________________
input_24 (InputLayer) [(None, 512)] 0
__________________________________________________________________________________________________
sequential (Sequential) (None, 512) 1050624 input_18[0][0]
input_19[0][0]
input_20[0][0]
input_21[0][0]
input_22[0][0]
input_23[0][0]
input_24[0][0]
__________________________________________________________________________________________________
input_25 (InputLayer) [(None, 256, 256, 1) 0
__________________________________________________________________________________________________
model_1 (Functional) (None, 256, 256, 3) 14269368 sequential[0][0]
sequential[1][0]
sequential[2][0]
sequential[3][0]
sequential[4][0]
sequential[5][0]
sequential[6][0]
input_25[0][0]
==================================================================================================
Total params: 15,319,992
Trainable params: 15,319,992
Non-trainable params: 0
__________________________________________________________________________________________________
As stated in error message, the problem is at line 519, but a similar call also occurs at line 546. The tensor in question of dimension (16, 1) is called trunc
, and its passed in a list with another tensor that's then added to another. Upon removing trunc
in both calls, the error goes away, but I'm monitoring my system resources in Activity Monitor, and it doesn't seem like there's anything going on. I did get two new additions to the Results
folder, so maybe that's a good sign?
from stylegan2-tensorflow-2.0.
Bug !
trunc = 0.5
n1 = noiseList(64)
n2 = nImage(64)
trunc = np.ones([64, 1]) * trunc
trunc.shape
(64,1)
len(n1)
7
n2.shape
(64, 256, 256, 1)
len(n1 + [n2, trunc])
9
==> Passing 9 inputs to the generator while the generator accepts only 8. Must be a bug and this code is completely not tested before releasing ...?
You can do this: (I am NOT sure if multiply is a correct ops though...)
trunc = tf.reshape(trunc, (trunc.shape[0], 1, 1, 1))
n2_trunc = tf.math.multiply(n2, trunc)
...and then
generated_images = self.GAN.GMA.predict(n1 + [n2_trunc], batch_size = BATCH_SIZE)
from stylegan2-tensorflow-2.0.
Hello everyone! Thank you for your comments. It appears that before uploading the code after some updates, I forgot to remove the input variable 'trunc' on lines 493, 508 and 534. Sorry about that! Updated code, compatible with TF 2.5.x should be uploaded tonight. Thanks again.
from stylegan2-tensorflow-2.0.
Related Issues (20)
- the problem about official version HOT 2
- To better understanding
- Choice of loss function
- conv2d_mod/Conv2D NCHW not implemented HOT 2
- Finding latent vector for image
- Why two gradient tapes are used? HOT 1
- Possible to generate 360 landscapes in equirectangular mode from exisiting NON-360 landcapes? HOT 1
- Can you make this work with Tensorflow 2.4.1 and above with tf.distribute.MirroredStrategy() HOT 2
- How to output single large images? HOT 1
- Asking the dataset and labels
- About model conversion HOT 2
- bad marshal data (unknown type code)
- Generated images are very white
- how to train a face editor with stylegan? HOT 2
- I keep hitting NaN value error. HOT 1
- load LandscapesBig mode error HOT 4
- TypeError: Dimension value must be integer or None or have an __index__ method, got 256.0 HOT 4
- Why in my training, not the same as Latent have the same generator pictures HOT 1
- loss problem HOT 1
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 stylegan2-tensorflow-2.0.