-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
run main.py with error #10
Comments
Hello, It seems that you don't have the jar file that computes the TER metric. Have you installed the Coco-caption package from my fork? If so, please, can you attach the output of:
Regards |
Hi @lvapeab , i hava installed the Coco-caption package successfully. |
You lack the tercom file. I don't know if there was a problem in the installation. You can try reinstalling it again or manually placing the tercom.7.25 file in your |
I reinstalling Coco-caption by the command of python setup.py install, and still lack the tercom file, then manually placing the tercom.7.25 file in the above folder. under the folder of the |
Ok, I've seen the mistake and corrected it in the Coco-caption package (lvapeab/coco-caption@ca089be). Pull the coco-caption package an run again the |
Hi @lvapeab , it works, thank you very much! |
请问你是在中英翻译吗?这个bug你解决了吗? |
Hi @lvapeab I'm still getting the error, is it because I'm using windows?
|
Hi @qazs , do you have |
Yes, here's my java version
|
Hmm... It seems this error has also been reported in the original scoring library (tylin/coco-caption#28). Unfortunately, I cannot test it in Windows. As a workaround, I suggest you to edit your
Moreover, if there is a problem with subprocess and Windows, it is possible that the TER score won't also work. If this is the case, comment the corresponding line (in the same file):
|
Commenting out the lines works, thanks! |
[25/05/2017 11:57:37] Training parameters: {'reload_epoch': 0, 'shuffle': True, 'verbose': 1, 'data_augmentation': False, 'class_weights': None, 'epochs_for_save': 1, 'lr_gamma': 0.8, 'start_eval_on_epoch': 1, 'n_epochs': 500, 'patience': 20, 'mean_substraction': True, 'normalize': False, 'n_parallel_loaders': 1, 'each_n_epochs': 1, 'patience_check_split': 'val', 'lr_decay': None, 'homogeneous_batches': False, 'batch_size': 50, 'metric_check': 'Bleu_4', 'num_iterations_val': None, 'epoch_offset': 0, 'joint_batches': 4, 'maxlen': 50, 'eval_on_epochs': True, 'eval_on_sets': [], 'extra_callbacks': [<keras_wrapper.extra.callbacks.EvalPerformance object at 0x7fc1dfd6fad0>, <keras_wrapper.extra.callbacks.Sample object at 0x7fc1e5723ed0>]}
ERROR (theano.gof.opt): SeqOptimizer apply <theano.scan_module.scan_opt.PushOutScanOutput object at 0x7fc216a1a110>
[25/05/2017 11:57:41] SeqOptimizer apply <theano.scan_module.scan_opt.PushOutScanOutput object at 0x7fc216a1a110>
ERROR (theano.gof.opt): Traceback:
[25/05/2017 11:57:41] Traceback:
ERROR (theano.gof.opt): Traceback (most recent call last):
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/theano/gof/opt.py", line 235, in apply
sub_prof = optimizer.optimize(fgraph)
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/theano/gof/opt.py", line 87, in optimize
ret = self.apply(fgraph, *args, **kwargs)
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/theano/scan_module/scan_opt.py", line 685, in apply
node = self.process_node(fgraph, node)
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/theano/scan_module/scan_opt.py", line 745, in process_node
node, args)
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/theano/scan_module/scan_opt.py", line 854, in push_out_inner_vars
add_as_nitsots)
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/theano/scan_module/scan_opt.py", line 906, in add_nitsot_outputs
reason='scanOp_pushout_output')
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/theano/gof/toolbox.py", line 391, in replace_all_validate_remove
chk = fgraph.replace_all_validate(replacements, reason)
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/theano/gof/toolbox.py", line 365, in replace_all_validate
fgraph.validate()
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/theano/gof/toolbox.py", line 256, in validate_
ret = fgraph.execute_callbacks('validate')
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/theano/gof/fg.py", line 589, in execute_callbacks
fn(self, *args, **kwargs)
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/theano/gof/toolbox.py", line 422, in validate
raise theano.gof.InconsistencyError("Trying to reintroduce a removed node")
InconsistencyError: Trying to reintroduce a removed node
[25/05/2017 11:57:41] Traceback (most recent call last):
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/theano/gof/opt.py", line 235, in apply
sub_prof = optimizer.optimize(fgraph)
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/theano/gof/opt.py", line 87, in optimize
ret = self.apply(fgraph, *args, **kwargs)
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/theano/scan_module/scan_opt.py", line 685, in apply
node = self.process_node(fgraph, node)
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/theano/scan_module/scan_opt.py", line 745, in process_node
node, args)
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/theano/scan_module/scan_opt.py", line 854, in push_out_inner_vars
add_as_nitsots)
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/theano/scan_module/scan_opt.py", line 906, in add_nitsot_outputs
reason='scanOp_pushout_output')
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/theano/gof/toolbox.py", line 391, in replace_all_validate_remove
chk = fgraph.replace_all_validate(replacements, reason)
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/theano/gof/toolbox.py", line 365, in replace_all_validate
fgraph.validate()
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/theano/gof/toolbox.py", line 256, in validate_
ret = fgraph.execute_callbacks('validate')
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/theano/gof/fg.py", line 589, in execute_callbacks
fn(self, *args, **kwargs)
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/theano/gof/toolbox.py", line 422, in validate
raise theano.gof.InconsistencyError("Trying to reintroduce a removed node")
InconsistencyError: Trying to reintroduce a removed node
Epoch 1/500
9850/9900 [============================>.] - ETA: 0s - loss: 2.4758[25/05/2017 12:00:49]
<<< Predicting outputs of val set >>>
Sampling 100/100 - ETA: 0s
Total cost of the translations: 203.730323 Average cost of the translations: 2.037303
The sampling took: 28.331956 secs (Speed: 0.283320 sec/sample)
[25/05/2017 12:01:17] Decoding beam search prediction ...
[25/05/2017 12:01:17] Evaluating on metric coco
bash: tercom.7.25: No such file or directory
Traceback (most recent call last):
File "main.py", line 370, in
train_model(parameters, args.dataset)
File "main.py", line 131, in train_model
nmt_model.trainNet(dataset, training_params)
File "build/bdist.linux-x86_64/egg/keras_wrapper/cnn_model.py", line 702, in trainNet
File "build/bdist.linux-x86_64/egg/keras_wrapper/cnn_model.py", line 864, in __train
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/Keras-1.2.0-py2.7.egg/keras/engine/training.py", line 1623, in fit_generator
callbacks.on_epoch_end(epoch, epoch_logs)
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/Keras-1.2.0-py2.7.egg/keras/callbacks.py", line 43, in on_epoch_end
callback.on_epoch_end(epoch, logs)
File "build/bdist.linux-x86_64/egg/keras_wrapper/extra/callbacks.py", line 185, in on_epoch_end
File "build/bdist.linux-x86_64/egg/keras_wrapper/extra/callbacks.py", line 320, in evaluate
File "build/bdist.linux-x86_64/egg/keras_wrapper/extra/evaluation.py", line 69, in get_coco_score
File "/home/hanyaqian/anaconda2/lib/python2.7/site-packages/Coco_Caption-0.0-py2.7.egg/pycocoevalcap/ter/ter.py", line 55, in compute_score
return float(score), None
ValueError: could not convert string to float:
Can you tell me some detial about the error? Thanks very much!
The text was updated successfully, but these errors were encountered: