theislab / scgen

Single cell perturbation prediction
https://scgen.readthedocs.io
GNU General Public License v3.0
260 stars 52 forks source link

error at scgen.VAEArith() #10

Closed cjhong closed 4 years ago

cjhong commented 4 years ago

I create a conda environment for scgen and I followed the installation instruction. It seems successful. In Kang's example, I got this error message at scg = scgen.VAEArith(x_dimension= train.shape[1], model_path="./models/test" )

WARNING:tensorflow:Entity <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38cc5ae410>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38cc5ae410>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING: Entity <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38cc5ae410>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38cc5ae410>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity <bound method BatchNormalization.call of <tensorflow.python.layers.normalization.BatchNormalization object at 0x7f38cc5ae410>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method BatchNormalization.call of <tensorflow.python.layers.normalization.BatchNormalization object at 0x7f38cc5ae410>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING: Entity <bound method BatchNormalization.call of <tensorflow.python.layers.normalization.BatchNormalization object at 0x7f38cc5ae410>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method BatchNormalization.call of <tensorflow.python.layers.normalization.BatchNormalization object at 0x7f38cc5ae410>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity <bound method Dropout.call of <tensorflow.python.layers.core.Dropout object at 0x7f38cc5ae410>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method Dropout.call of <tensorflow.python.layers.core.Dropout object at 0x7f38cc5ae410>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING: Entity <bound method Dropout.call of <tensorflow.python.layers.core.Dropout object at 0x7f38cc5ae410>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method Dropout.call of <tensorflow.python.layers.core.Dropout object at 0x7f38cc5ae410>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38cc5ae410>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38cc5ae410>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING: Entity <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38cc5ae410>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38cc5ae410>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity <bound method BatchNormalization.call of <tensorflow.python.layers.normalization.BatchNormalization object at 0x7f38cc5ae410>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method BatchNormalization.call of <tensorflow.python.layers.normalization.BatchNormalization object at 0x7f38cc5ae410>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING: Entity <bound method BatchNormalization.call of <tensorflow.python.layers.normalization.BatchNormalization object at 0x7f38cc5ae410>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method BatchNormalization.call of <tensorflow.python.layers.normalization.BatchNormalization object at 0x7f38cc5ae410>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity <bound method Dropout.call of <tensorflow.python.layers.core.Dropout object at 0x7f38cc5ae410>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method Dropout.call of <tensorflow.python.layers.core.Dropout object at 0x7f38cc5ae410>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING: Entity <bound method Dropout.call of <tensorflow.python.layers.core.Dropout object at 0x7f38cc5ae410>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method Dropout.call of <tensorflow.python.layers.core.Dropout object at 0x7f38cc5ae410>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38cc5ae410>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38cc5ae410>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING: Entity <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38cc5ae410>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38cc5ae410>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38cc5ae410>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38cc5ae410>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING: Entity <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38cc5ae410>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38cc5ae410>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38d06c9090>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38d06c9090>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING: Entity <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38d06c9090>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38d06c9090>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity <bound method BatchNormalization.call of <tensorflow.python.layers.normalization.BatchNormalization object at 0x7f38d06c9090>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method BatchNormalization.call of <tensorflow.python.layers.normalization.BatchNormalization object at 0x7f38d06c9090>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING: Entity <bound method BatchNormalization.call of <tensorflow.python.layers.normalization.BatchNormalization object at 0x7f38d06c9090>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method BatchNormalization.call of <tensorflow.python.layers.normalization.BatchNormalization object at 0x7f38d06c9090>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity <bound method Dropout.call of <tensorflow.python.layers.core.Dropout object at 0x7f38d06c9090>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method Dropout.call of <tensorflow.python.layers.core.Dropout object at 0x7f38d06c9090>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING: Entity <bound method Dropout.call of <tensorflow.python.layers.core.Dropout object at 0x7f38d06c9090>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method Dropout.call of <tensorflow.python.layers.core.Dropout object at 0x7f38d06c9090>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38d06c9090>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38d06c9090>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING: Entity <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38d06c9090>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38d06c9090>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity <bound method BatchNormalization.call of <tensorflow.python.layers.normalization.BatchNormalization object at 0x7f38d06c9090>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method BatchNormalization.call of <tensorflow.python.layers.normalization.BatchNormalization object at 0x7f38d06c9090>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING: Entity <bound method BatchNormalization.call of <tensorflow.python.layers.normalization.BatchNormalization object at 0x7f38d06c9090>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method BatchNormalization.call of <tensorflow.python.layers.normalization.BatchNormalization object at 0x7f38d06c9090>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity <bound method Dropout.call of <tensorflow.python.layers.core.Dropout object at 0x7f38d06c9090>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method Dropout.call of <tensorflow.python.layers.core.Dropout object at 0x7f38d06c9090>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING: Entity <bound method Dropout.call of <tensorflow.python.layers.core.Dropout object at 0x7f38d06c9090>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method Dropout.call of <tensorflow.python.layers.core.Dropout object at 0x7f38d06c9090>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING:tensorflow:Entity <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38d06c9090>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38d06c9090>>: AssertionError: Bad argument number for Name: 3, expecting 4 WARNING: Entity <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38d06c9090>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, export AUTOGRAPH_VERBOSITY=10) and attach the full output. Cause: converting <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f38d06c9090>>: AssertionError: Bad argument number for Name: 3, expecting 4

ValueError Traceback (most recent call last)

in ----> 1 scg = scgen.VAEArith(x_dimension= train.shape[1], model_path="./models/test" ) ~/.local/lib/python3.7/site-packages/scgen/models/_vae.py in __init__(self, x_dimension, z_dimension, **kwargs) 44 self.init_w = tf.contrib.layers.xavier_initializer() 45 self._create_network() ---> 46 self._loss_function() 47 self.sess = tf.Session() 48 self.saver = tf.train.Saver(max_to_keep=1) ~/.local/lib/python3.7/site-packages/scgen/models/_vae.py in _loss_function(self) 156 self.vae_loss = tf.reduce_mean(recon_loss + self.alpha * kl_loss) 157 with tf.control_dependencies(tf.get_collection(tf.GraphKeys.UPDATE_OPS)): --> 158 self.solver = tf.train.AdamOptimizer(learning_rate=self.learning_rate).minimize(self.vae_loss) 159 160 def to_latent(self, data): ~/.local/lib/python3.7/site-packages/tensorflow/python/training/optimizer.py in minimize(self, loss, global_step, var_list, gate_gradients, aggregation_method, colocate_gradients_with_ops, name, grad_loss) 411 412 return self.apply_gradients(grads_and_vars, global_step=global_step, --> 413 name=name) 414 415 def compute_gradients(self, loss, var_list=None, ~/.local/lib/python3.7/site-packages/tensorflow/python/training/optimizer.py in apply_gradients(self, grads_and_vars, global_step, name) 595 ([str(v) for _, v, _ in converted_grads_and_vars],)) 596 with ops.init_scope(): --> 597 self._create_slots(var_list) 598 update_ops = [] 599 with ops.name_scope(name, self._name) as name: ~/.local/lib/python3.7/site-packages/tensorflow/python/training/adam.py in _create_slots(self, var_list) 129 # Create slots for the first and second moments. 130 for v in var_list: --> 131 self._zeros_slot(v, "m", self._name) 132 self._zeros_slot(v, "v", self._name) 133 ~/.local/lib/python3.7/site-packages/tensorflow/python/training/optimizer.py in _zeros_slot(self, var, slot_name, op_name) 1153 named_slots = self._slot_dict(slot_name) 1154 if _var_key(var) not in named_slots: -> 1155 new_slot_variable = slot_creator.create_zeros_slot(var, op_name) 1156 self._restore_slot_variable( 1157 slot_name=slot_name, variable=var, ~/.local/lib/python3.7/site-packages/tensorflow/python/training/slot_creator.py in create_zeros_slot(primary, name, dtype, colocate_with_primary) 188 return create_slot_with_initializer( 189 primary, initializer, slot_shape, dtype, name, --> 190 colocate_with_primary=colocate_with_primary) 191 else: 192 if isinstance(primary, variables.Variable): ~/.local/lib/python3.7/site-packages/tensorflow/python/training/slot_creator.py in create_slot_with_initializer(primary, initializer, shape, dtype, name, colocate_with_primary) 162 with distribution_strategy.extended.colocate_vars_with(primary): 163 return _create_slot_var(primary, initializer, "", validate_shape, shape, --> 164 dtype) 165 else: 166 return _create_slot_var(primary, initializer, "", validate_shape, shape, ~/.local/lib/python3.7/site-packages/tensorflow/python/training/slot_creator.py in _create_slot_var(primary, val, scope, validate_shape, shape, dtype) 72 shape=shape, 73 dtype=dtype, ---> 74 validate_shape=validate_shape) 75 variable_scope.get_variable_scope().set_partitioner(current_partitioner) 76 ~/.local/lib/python3.7/site-packages/tensorflow/python/ops/variable_scope.py in get_variable(name, shape, dtype, initializer, regularizer, trainable, collections, caching_device, partitioner, validate_shape, use_resource, custom_getter, constraint, synchronization, aggregation) 1494 constraint=constraint, 1495 synchronization=synchronization, -> 1496 aggregation=aggregation) 1497 1498 ~/.local/lib/python3.7/site-packages/tensorflow/python/ops/variable_scope.py in get_variable(self, var_store, name, shape, dtype, initializer, regularizer, reuse, trainable, collections, caching_device, partitioner, validate_shape, use_resource, custom_getter, constraint, synchronization, aggregation) 1237 constraint=constraint, 1238 synchronization=synchronization, -> 1239 aggregation=aggregation) 1240 1241 def _get_partitioned_variable(self, ~/.local/lib/python3.7/site-packages/tensorflow/python/ops/variable_scope.py in get_variable(self, name, shape, dtype, initializer, regularizer, reuse, trainable, collections, caching_device, partitioner, validate_shape, use_resource, custom_getter, constraint, synchronization, aggregation) 560 constraint=constraint, 561 synchronization=synchronization, --> 562 aggregation=aggregation) 563 564 def _get_partitioned_variable(self, ~/.local/lib/python3.7/site-packages/tensorflow/python/ops/variable_scope.py in _true_getter(name, shape, dtype, initializer, regularizer, reuse, trainable, collections, caching_device, partitioner, validate_shape, use_resource, constraint, synchronization, aggregation) 512 constraint=constraint, 513 synchronization=synchronization, --> 514 aggregation=aggregation) 515 516 synchronization, aggregation, trainable = ( ~/.local/lib/python3.7/site-packages/tensorflow/python/ops/variable_scope.py in _get_single_variable(self, name, shape, dtype, initializer, regularizer, partition_info, reuse, trainable, collections, caching_device, validate_shape, use_resource, constraint, synchronization, aggregation) 862 tb = [x for x in tb if "tensorflow/python" not in x[0]][:5] 863 raise ValueError("%s Originally defined at:\n\n%s" % --> 864 (err_msg, "".join(traceback.format_list(tb)))) 865 found_var = self._vars[name] 866 if not shape.is_compatible_with(found_var.get_shape()): ValueError: Variable encoder/dense/kernel/Adam/ already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope? Originally defined at: File "~/.local/lib/python3.7/site-packages/scgen/models/_vae.py", line 158, in _loss_function self.solver = tf.train.AdamOptimizer(learning_rate=self.learning_rate).minimize(self.vae_loss) File "~/.local/lib/python3.7/site-packages/scgen/models/_vae.py", line 46, in __init__ self._loss_function() File "", line 1, in scg = scgen.VAEArith(x_dimension= train.shape[1], model_path="./models/test" ) File "<...>/miniconda3/envs/scgen/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3326, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<...>/miniconda3/envs/scgen/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3249, in run_ast_nodes if (await self.run_code(code, result, async_=asy)):