zysszy/GrammarCNN

Model training error

talk2kabir opened this issue · 3 comments

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

I am sorry for this. It seems I have missed an example of this command.

You can run the command python3 run.py train dev var, where the word dev can be replaced by test and the word var can be replaced by func or tree.

Zeyu

Thank you. its works but after debugging some few errors, I am stuck with the following error again
(py37) (base) lab@master:~/GrammarCNN/model$ python3 run.py train test func
File "run.py", line 198
card_number = loadcardnum()zxcv1234
^
SyntaxError: invalid syntax

I wonder what could be the problem with the line in question
os.system("tar -zxvf data_" + sys.argv[3] + ".tar.gz")

It seems you have gotten a syntax error.
I have checked the code of GrammarCNN. However, I fail to find this error.
Please check the line 198 of your file run.py especially for tabs or spaces.

Zeyu