Git Product home page Git Product logo

grammarcnn's People

Contributors

anonymous15432 avatar zysszy 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grammarcnn's Issues

Predicting seem slow

I have run python3 run.py train ..., and when I run python3 run.py pre, it's slow to generate codes for a card.
It takes about 5-10 minutes for a card.

work begin
search level is 0
..... many times
1th card is finished

Is it normal? I'm assuming that if this can apply to real world applications, it should take less than 3 seconds.
Is it possible to make it faster?

Model training error

I encounter the following error while training the a model using
python3 run.py train [dev|test] [tree|var|func]

(py37) lab@master:~/GrammarCNN/model$ python3 run.py train [dev|test] [tree|var|func]
func]: command not found

Command 'test]' not found, did you mean:

command 'test' from deb coreutils (8.30-3ubuntu2)
command 'testr' from deb python3-testrepository (0.0.20-5)

Try: sudo apt install

Command 'var' not found, but there are 19 similar ones.

/home/lab/anaconda3/envs/py37/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:523: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/lab/anaconda3/envs/py37/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:524: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/lab/anaconda3/envs/py37/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/lab/anaconda3/envs/py37/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/lab/anaconda3/envs/py37/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:527: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/lab/anaconda3/envs/py37/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:532: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
Traceback (most recent call last):
File "run.py", line 215, in
main()
File "run.py", line 195, in main
os.system("tar -zxvf data
" + sys.argv[3] + ".tar.gz")
IndexError: list index out of range
Exception ignored in: <_io.TextIOWrapper name='' mode='w' encoding='UTF-8'>
BrokenPipeError: [Errno 32] Broken pipe

Can you please suggest how I should debug the error.
Thank you

关于模型训练速度

请问您是在什么硬件配置下训练该模型的,训练模型大概花了多长时间,谢谢!

what the cmd exactly is?

all I need to do is:
python3 run.py train test tree
python3 run.py train test var
python3 run.py train test func
python3 run.py test

or instead:
I need to python run.py 3*3=9 times?

Your code about data preprocessing

I am surprised about the format of your input data which divide in a tree structure.
SO may you provide your code about how to preprocess the data?
I believe it is the most exquisite part in your work, others could draw on the experience of it.

CNN implemence in code_generate_model.py

I have another question:
I find that in your code_generate_model.py
the tree-based CNN, tree-path CNN, pre-order CNN all call the same function def my_conv() in line 119-128?
so what's the difference? (except the input data)

Sharable baseline resources?

Hello Dear Author,

This is a good implementation! Nowadays, there're not so many program generation works that make their codes open-sourced. At the same time, I see there are several AST-based baselines used in your publication, but I didn't find their official resources. It would be better if could play with some of them (Seq2Tree, SNM, and ASN) together with your GrammarCNN. Could I ask which Github resources (official or unofficial) for these AST-based baseline models are you used?

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.