Log1cChan / T2F

Using StyleGan to generate Face from simple Text description
2 stars 0 forks source link

Taking input in english #1

Open sam7199 opened 3 years ago

sam7199 commented 3 years ago

I am new to Tensorflow can you guide me on how to convert this so that it take input in English ? and Great work I have change the train.txt into english but I am getting the folllowing error when i try to train trainTextToFace.py

Using TensorFlow backend. Dense NO.1 Dense NO.2 Dense NO.3 Reshape over WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/ops/resource_variable_ops.py:1630: calling BaseResourceVariable.init (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version. Instructions for updating: If using Keras pass *_constraint arguments to layers. compile over Traceback (most recent call last): File "trainTextToFace.py", line 28, in train() File "trainTextToFace.py", line 24, in train model.fit(sentenceEmbedding, imageDlatents, batch_size = 50, epochs = 200) File "/tensorflow-1.15.2/python3.7/keras/engine/training.py", line 1154, in fit batch_size=batch_size) File "/tensorflow-1.15.2/python3.7/keras/engine/training.py", line 504, in _standardize_user_data self._set_inputs(x) File "/tensorflow-1.15.2/python3.7/keras/engine/training.py", line 416, in _set_inputs self.build(input_shape=(None,) + inputs.shape[1:]) File "/tensorflow-1.15.2/python3.7/keras/engine/sequential.py", line 222, in build x = layer(x) File "/tensorflow-1.15.2/python3.7/keras/engine/base_layer.py", line 446, in call self.assert_input_compatibility(inputs) File "/tensorflow-1.15.2/python3.7/keras/engine/base_layer.py", line 358, in assert_input_compatibility str(K.ndim(x))) ValueError: Input 0 is incompatible with layer dense_1: expected min_ndim=2, found ndim=1

Log1cChan commented 3 years ago

I think the problem occurred because I use the specific Bert Server which is used to convert Chinese into word vector, and you can have a try to find the right version for English. Thanks for your following and I created this project by rectified some mistakes in aloychen's repository.