Code Monkey home page Code Monkey logo

terpret's People

Contributors

jfeser avatar mmjb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

terpret's Issues

Tensorflow backend crashes on null values

I've tried running the updated NFP examples with the current TerpreT version and ended up crashing bin/fp_train:

TerpreT$ bin/fp_train.py compiled/tensorflow_models/cmbtypimm__maxInt_10__inputNum_2__inputStackSize_5__prefixLength_0__lambdaLength_3__suffixLength_2.hypers_compiled.py data/nfp/mapAddK__cmbtypimm__maxInt_10__inputNum_2__inputStackSize_5__prefixLength_0__lambdaLength_3__suffixLength_2.data.json
Construct forward graph... done in 28.66s.
Construct gradient graph... done in 77.75s.
Construct apply gradient graph... done in 0.27s.
Construct check numerics graph... done in 46.82s.
Initializing variables... done in 19.83s.
{'dirichletInitScale': 2,
 'fEntropyBonusDecayRate': 0.5,
 'fGradientNoise': 0.01,
 'fGradientNoiseGamma': 0.55,
 'gradientClipC2': 1.0,
 'learning_rate': 0.1,
 'learning_rate_decay': 0.9,
 'minibatch_size': -1,
 'momentum': 0.0,
 'num_epochs': 3000,
 'optimizer': 'rmsprop',
 'print_frequency': 100,
 'stop_below_loss': 0.005}
Traceback (most recent call last):
  File "bin/fp_train.py", line 62, in <module>
    train.load_and_run(args, FPTrainer)
  File "/mnt/nfs/users/mabrocks/Projects/TerpreT/bin/train.py", line 109, in load_and_run
    print_final_loss_breakdown=print_loss_breakdown)
  File "bin/../lib/trainer.py", line 452, in train
    self.do_one_update(train_batch_name)
  File "bin/../lib/trainer.py", line 279, in do_one_update
    results = self.sess.run(ops_to_execute, observed_vals)
  File "/mnt/nfs/users/mabrocks/venvs/fpsynth/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 766, in run
    run_metadata_ptr)
  File "/mnt/nfs/users/mabrocks/venvs/fpsynth/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 943, in _run
    % (np_val.shape, subfeed_t.name, str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (5,) for Tensor u'Tile_1:0', which has shape '(?, ?)'

I've attached a zip with the hypers + input examples causing this.

mapAddK__cmbtypimm__maxInt_10__inputNum_2__inputStackSize_5__prefixLength_0__lambdaLength_3__suffixLength_2.data.zip

Some bugs in "basic_block.hypers_compiled.py" for tensorflow(1.14)

I am recently following the program synthesis method such as the TerpreT, proposed by Microsoft. Thank you for your excellent and encouraging work. Based on the readme file, everything works correctly in the demo case (test1.py, test1_data.json, and test1_hypers.json), except some necessary adaptations between tensorflow version 0.02 to tensorflow 1.14 and python2.7 to python3.7.

However, when I applied the project to solve the basic_block problem, errors were reported. I think my procedure is correct. First of all, generate the data and hyper parameters of the graph. Then use the compile_tensorflow.py to build a "basic_block.hypers_compiled.py" file. And call the train.py to run the graph. After that, the project runs well as the screenshot below,
image
but after a few moment, it reports that the input arguments of the "stack" method are not consistent. ("tf.pack" should be altered to "tf.stack")
image
image

I guess the bugs lie in basic_block.hypers_compiled.py since the instruction_0, thenBlock_0, and elseBlock_0 which are Tensor objects, have no attribute named .set_to_constant. Though I have made some adaptation such as tf.zeros_like and tf.constant, I cannot fix it out.

Does anyone have ideas on these problems?

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.