GithubHelp home page GithubHelp logo

Facing the error about relgan HOT 8 CLOSED

weilinie avatar weilinie commented on August 17, 2024
Facing the error

from relgan.

Comments (8)

weilinie avatar weilinie commented on August 17, 2024

The error seems come from gen_o has not been properly converted to a Tensor from a TenorArray. Could you add gen_o.stack() in your code? I also updated the rmc_att and rmc_vdcnn in case that you were using them.

from relgan.

mmkjj avatar mmkjj commented on August 17, 2024

But after adding gen_o.stack(),Another Error happended:

\oracle\oracle_gan\oracle_train.py", line 314, in get_train_ops
temp_train_op = temp_optimizer.apply_gradients(zip(temp_grads, [temperature]))
lib\site-packages\tensorflow\python\training\optimizer.py", line 472, in apply_gradients
([str(v) for _, _, v in converted_grads_and_vars],))
ValueError: No gradients provided for any variable: ['<tensorflow.python.training.optimizer._RefVariableProcessor object at 0x000001CF5ED1C390>'].

from relgan.

weilinie avatar weilinie commented on August 17, 2024

Not sure where you added gen_o.stack(). Can you confirm if you are using rmc_att or rmc_vdcnn? If so, maybe you can pull it again and see if you can run properly.

from relgan.

mmkjj avatar mmkjj commented on August 17, 2024

I changed the get_losses() function in oracle_train.py:
from log_pg = tf.reduce_mean(tf.log(gen_o + EPS))
to 'log_pg = tf.reduce_mean(tf.log(gen_o.stack() + EPS))'
I used the default parameters, So I think that the generator and discriminator are both rmc_att, and type of the GAN is standard

from relgan.

weilinie avatar weilinie commented on August 17, 2024

OK, there is something wrong with rmc_att and I fixed it. Also, I changed the default GAN architecture in run.py to rmc_vanilla, because all the experiments in the paper are based on rmc_vanilla actually. Can you pull it again?

from relgan.

mmkjj avatar mmkjj commented on August 17, 2024

I downloaded all of your new code again,. This time I think the default GAN architecture is rmc_vanilla.
However it seems that I'm facing a new Error :

oracle\oracle_gan\oracle_train.py", line 355, in get_metric_summary_op
metric_summary_op = tf.summary.merge(metrics_sum)
lib\site-packages\tensorflow\python\summary\summary.py", line 271, in merge
val = _gen_logging_ops._merge_summary(inputs=inputs, name=name)
lib\site-packages\tensorflow\python\ops\gen_logging_ops.py", line 314, in _merge_summary
"MergeSummary", inputs=inputs, name=name)
lib\site-packages\tensorflow\python\framework\op_def_library.py", line 570, in _apply_op_helper
(input_name, op_type_name, len(values), num_attr.minimum))
ValueError: List argument 'inputs' to 'MergeSummary' Op with length 0 shorter than minimum length 1.

from relgan.

weilinie avatar weilinie commented on August 17, 2024

This is because all the metrics are set to False with the default setting in run.py (line 41-45). You can set at least one of the metrics to True to avoid this issue.

from relgan.

mmkjj avatar mmkjj commented on August 17, 2024

Oh,solved..
Thank you very much :)

from relgan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.