Traceback (most recent call last):


 "autoencoder_dp.py", line 70, in <module>

population_size=60000).minimize(cost)


 "/home/madono/.pyenv/versions/anaconda3-2018.12/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/training/optimizer.py", line 399, in minimize

grad_loss=grad_loss)


 "/home/madono/madono/test2/dpgan/privacy/optimizers/dp_optimizer.py", line 68, in compute_gradients

microbatches_losses = tf.reshape(loss, [self._num_microbatches, -1])


 "/home/madono/.pyenv/versions/anaconda3-2018.12/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py", line 5782, in reshape

"Reshape", tensor=tensor, shape=shape, name=name)


 "/home/madono/.pyenv/versions/anaconda3-2018.12/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper

op_def=op_def)


 "/home/madono/.pyenv/versions/anaconda3-2018.12/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3292, in create_op

compute_device=compute_device)


 "/home/madono/.pyenv/versions/anaconda3-2018.12/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3332, in _create_op_helper

set_shapes_for_outputs(op)


 "/home/madono/.pyenv/versions/anaconda3-2018.12/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 2496, in set_shapes_for_outputs

return _set_shapes_for_outputs(op)


 "/home/madono/.pyenv/versions/anaconda3-2018.12/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 2469, in _set_shapes_for_outputs

shapes = shape_func(op)


 "/home/madono/.pyenv/versions/anaconda3-2018.12/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 2399, in call_with_requiring

return call_cpp_shape_fn(op, require_shape_fn=True)


 "/home/madono/.pyenv/versions/anaconda3-2018.12/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/common_shapes.py", line 627, in call_cpp_shape_fn

require_shape_fn)


 "/home/madono/.pyenv/versions/anaconda3-2018.12/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/common_shapes.py", line 691, in _call_cpp_shape_fn_impl

raise ValueError(err.message)
ValueError: Dimension size must be evenly divisible by 2 but is 1 for 'Reshape' (op: 'Reshape') with input shapes: [], [2] and with input tensors computed as partial shapes: input[1] = [2,?].

Traceback (most recent call last):


 "main.py", line 124, in <module>

main()


 "main.py", line 66, in main

gan.train(x_train, CONFIG['train'])


 "/home/allenpeng0209/musegan/musegan/musegan/models.py", line 113, in train

self.save_samples('x_train', x_train, save_midi=True)


 "/home/allenpeng0209/musegan/musegan/model.py", line 171, in save_samples

midi_io.save_midi(midipath, binarized, self.config)


 "/home/allenpeng0209/musegan/musegan/utils/midi_io.py", line 84, in save_midi

tempo=config['tempo'])


 "/home/allenpeng0209/musegan/musegan/utils/midi_io.py", line 36, in write_midi

raise ValueError("`pianorolls` and `program_nums` must have the same"
ValueError: `pianorolls` and `program_nums` must have the samelength