-
Notifications
You must be signed in to change notification settings - Fork 208
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
tensorflow.python.framework.errors_impl.InvalidArgumentError: All dimensions except 2 must match. Input 1 has shape [128 32 512] and doesn't match input 0 with shape [128 16 512] #38
Comments
Original stack trace for 'gradients/generator/upsc_conv3/concatenate/concat_grad/ConcatOffset': ...which was originally created as op 'generator/upsc_conv3/concatenate/concat', defined at: |
What's the full command you're using to train? I can't reproduce the issue on my end. What are you setting as the pool size and stride? |
Sorry for the delayed response. Rather than using the default parameters, use the following: --train ../data/vctk/speaker1/vctk-speaker1-train.4.16000.8192.4096.h5 \
--val ../data/vctk/speaker1/vctk-speaker1-val.4.16000.8192.4096.h5 \
-e 120 \
--batch-size 64 \
--lr 3e-4 \
--logname singlespeaker \
--model audiotfilm \
--r 4 \
--layers 4 \
--piano false \
--pool_size 2 \
--strides 2
--full true |
And you can't train data files with dimension -1. (Those are just used to evaluate the "full" SNR on non-patched audio.) If you're just looking to test out the code, I recommend sticking with the example code in the |
Hi!
I recently encountered a problem as follows:
List of arrays in input file: ['data', 'label']
Shape of X: (66688, 8192, 1)
Shape of Y: (66688, 8192, 1)
List of arrays in input file: ['data', 'label']
Shape of X: (5248, 8192, 1)
Shape of Y: (5248, 8192, 1)
audiotfilm
building model...
D-Block: (None, None, 128)
D-Block: (None, None, 256)
D-Block: (None, None, 512)
D-Block: (None, None, 512)
U-Block: (None, None, 1024)
U-Block: (None, None, 1024)
U-Block: (None, None, 512)
U-Block: (None, None, 256)
creating train_op with params: {'alg': 'adam', 'lr': 0.001, 'b1': 0.9, 'b2': 0.999, 'batch_size': 128, 'layers': 4}
WARNING:tensorflow:From /root/anaconda3/envs/xiaojian/lib/python3.7/site-packages/tensorflow/python/util/tf_should_use.py:247: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use
tf.global_variables_initializer
instead.Parameters: 68221186
Traceback (most recent call last):
File "/root/anaconda3/envs/xiaojian/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1375, in _do_call
return fn(*args)
File "/root/anaconda3/envs/xiaojian/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1360, in _run_fn
target_list, run_metadata)
File "/root/anaconda3/envs/xiaojian/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1453, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: All dimensions except 2 must match. Input 1 has shape [128 32 512] and doesn't match input 0 with shape [128 16 512].
[[{{node gradients/generator/upsc_conv3/concatenate/concat_grad/ConcatOffset}}]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):

File "run.py", line 176, in
main()
File "run.py", line 173, in main
args.func(args)
File "run.py", line 125, in train
model.fit(X_train, Y_train, X_val, Y_val, n_epoch=args.epochs, r=args.r, speaker=args.speaker, grocery=args.grocery, piano=args.piano, calc_full_snr = full)
File "/root/xiaojian/two/audio-super-res-master/src/models/model.py", line 249, in fit
tr_objective = self.train(feed_dict)
File "/root/xiaojian/two/audio-super-res-master/src/models/model.py", line 324, in train
[self.train_op, self.loss], feed_dict=feed_dict)
File "/root/anaconda3/envs/xiaojian/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 968, in run
run_metadata_ptr)
File "/root/anaconda3/envs/xiaojian/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1191, in _run
feed_dict_tensor, options, run_metadata)
File "/root/anaconda3/envs/xiaojian/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1369, in _do_run
run_metadata)
File "/root/anaconda3/envs/xiaojian/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1394, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: All dimensions except 2 must match. Input 1 has shape [128 32 512] and doesn't match input 0 with shape [128 16 512].
[[node gradients/generator/upsc_conv3/concatenate/concat_grad/ConcatOffset (defined at /root/xiaojian/two/audio-super-res-master/src/models/model.py:151) ]]
Is this problem caused by the environment configuration, or is it?
The text was updated successfully, but these errors were encountered: