question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Trying to share variable discriminator/d_h3_lin/Matrix

See original GitHub issue
{'batch_size': 64,
 'beta1': 0.5,
 'checkpoint_dir': 'checkpoint',
 'crop': False,
 'dataset': 'faces',
 'epoch': 25,
 'input_fname_pattern': '*.jpg',
 'input_height': 96,
 'input_width': 96,
 'learning_rate': 0.0002,
 'output_height': 64,
 'output_width': 64,
 'sample_dir': 'samples',
 'train': True,
 'train_size': inf,
 'visualize': False}
2017-05-02 18:44:49.160149: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-02 18:44:49.160180: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-02 18:44:49.160190: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-05-02 18:44:49.160197: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-02 18:44:49.160204: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
Traceback (most recent call last):
  File "main.py", line 97, in <module>
    tf.app.run()
  File "/usr/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "main.py", line 75, in main
    sample_dir=FLAGS.sample_dir)
  File "/opt/DCGAN-tensorflow/model.py", line 82, in __init__
    self.build_model()
  File "/opt/DCGAN-tensorflow/model.py", line 118, in build_model
    self.D_, self.D_logits_ = self.discriminator(self.G, reuse=True)
  File "/opt/DCGAN-tensorflow/model.py", line 332, in discriminator
    h4 = linear(tf.reshape(h3, [self.batch_size, -1]), 1, 'd_h3_lin')
  File "/opt/DCGAN-tensorflow/ops.py", line 98, in linear
    tf.random_normal_initializer(stddev=stddev))
  File "/usr/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py", line 1049, in get_variable
    use_resource=use_resource, custom_getter=custom_getter)
  File "/usr/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py", line 948, in get_variable
    use_resource=use_resource, custom_getter=custom_getter)
  File "/usr/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py", line 356, in get_variable
    validate_shape=validate_shape, use_resource=use_resource)
  File "/usr/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py", line 341, in _true_getter
    use_resource=use_resource)
  File "/usr/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py", line 658, in _get_single_variable
    found_var.get_shape()))
ValueError: Trying to share variable discriminator/d_h3_lin/Matrix, but specified shape (8192, 1) and found shape (18432, 1).

My commond is

python main.py --dataset faces --input_height=96 --output_height=64 --train

my data file size is 96*96,i’m try many time but always this error. can you help me?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12

github_iconTop GitHub Comments

5reactions
LittlePandaSeacommented, May 18, 2017

Change your arguments as: python main.py --image_size 96 --output_size 48 --dataset faces --crop True --train True --epoch 300. Not --is_crop True --is_train True --epoch 300. The formats of the input arguments is changed.

1reaction
chunfengshiliburunicommented, May 8, 2017

When I run the download.py,there is another problem: usage: download.py [-h] N [N …] download.py: error: the following arguments are required: N Can you help me?Please

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trying to share variable discriminator/d_h3_lin/Matrix, but ...
Hi, When I clone your repo, download the datasets and run the code, this is the error that I get. The issue comes...
Read more >
7.3. Variables — basf2 development documentation
returns the (i,j)-th element of the MomentumVertex Covariance Matrix (7x7). Order of elements in the covariance matrix is: px, py, pz, E, x,...
Read more >
Segmentally Variable Genes:A New Perspective on Adaptation
Segmentally variable genes show a mosaic pattern of one or more rapidly evolving, variable regions. Discerning their function may provide ...
Read more >
Involvement of a Membrane-Bound Amphiphilic Helix ... - NCBI
Mutational study suggested that H1 contributes to the PDZ-mediated substrate discrimination. We propose that the H1 segment acts as an adaptor ...
Read more >
Evaluating Structural Equation Models with Unobservable ...
The statistical tests used in the analysis of structural equation models with unobservable variables and measurement error are examined.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found