Skip to content
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

could not find file 'Flickr8k.token.txt' #11

Open
autogyro opened this issue Aug 19, 2018 · 1 comment
Open

could not find file 'Flickr8k.token.txt' #11

autogyro opened this issue Aug 19, 2018 · 1 comment

Comments

@autogyro
Copy link

Dear Aanieljl , where can I get the file? thanks.

D:\keras_image_captioning>python -m r-inference --dataset-type test --method beam_search --beam-size 3 --training-dir results/flickr8k/final-model
D:\Dev\IDE\Anaconda35\lib\site-packages\h5py_init_.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
Using TensorFlow backend.
2018-08-19 23:43:28 | Loading hyperparams config..
2018-08-19 23:43:28 | Building model..
WARNING:tensorflow:From D:\keras_image_captioning\losses.py:12: softmax_cross_entropy_with_logits (from tensorflow.python.ops.nn_ops) is deprecated and will be removed in a future version.
Instructions for updating:

Future major versions of TensorFlow will allow gradients to flow
into the labels input on backprop by default.

See @{tf.nn.softmax_cross_entropy_with_logits_v2}.

2018-08-19 23:43:55 | Loading model weights..
Traceback (most recent call last):
File "D:\Dev\IDE\Anaconda35\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "D:\Dev\IDE\Anaconda35\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\keras_image_captioning\r-inference.py", line 314, in
fire.Fire(main)
File "D:\Dev\IDE\Anaconda35\lib\site-packages\fire\core.py", line 127, in Fire
component_trace = _Fire(component, args, context, name)
File "D:\Dev\IDE\Anaconda35\lib\site-packages\fire\core.py", line 366, in _Fire
component, remaining_args)
File "D:\Dev\IDE\Anaconda35\lib\site-packages\fire\core.py", line 542, in _CallCallable
result = fn(*varargs, **kwargs)
File "D:\keras_image_captioning\r-inference.py", line 291, in main
max_caption_length=max_caption_length)
File "D:\keras_image_captioning\r-inference.py", line 121, in init
dataset_provider = DatasetProvider(single_caption=True)
File "D:\keras_image_captioning\dataset_providers.py", line 26, in init
get_dataset_instance(single_caption=single_caption))
File "D:\keras_image_captioning\datasets.py", line 133, in get_dataset_instance
single_caption=single_caption)
File "D:\keras_image_captioning\datasets.py", line 77, in init
self._build()
File "D:\keras_image_captioning\datasets.py", line 80, in _build
self._captions_of = self._build_captions()
File "D:\keras_image_captioning\datasets.py", line 97, in _build_captions
for img_filename, caption_txt in lines_splitted:
File "D:\keras_image_captioning\io_utils.py", line 39, in read_text_file
with open(path) as f:
FileNotFoundError: [Errno 2] No such file or directory: 'D:\keras-image-captioning-master\var\flickr8k\dataset\Flickr8k_text\Flickr8k.token.txt'

@autogyro
Copy link
Author

downloaded it, but, it said:

D:\projects\keras_image_captioning>python -m r-inference --dataset-type test --method beam_search --beam-size 3 --training-dir results/flickr8k/final-model
D:\Dev\IDE\Anaconda35\lib\site-packages\h5py_init_.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
Using TensorFlow backend.
2018-08-20 00:12:20 | Loading hyperparams config..
2018-08-20 00:12:20 | Building model..
WARNING:tensorflow:From D:\projects\keras_image_captioning\losses.py:12: softmax_cross_entropy_with_logits (from tensorflow.python.ops.nn_ops) is deprecated and will be removed in a future version.
Instructions for updating:

Future major versions of TensorFlow will allow gradients to flow
into the labels input on backprop by default.

See @{tf.nn.softmax_cross_entropy_with_logits_v2}.

2018-08-20 00:13:05 | Loading model weights..
Traceback (most recent call last):
File "D:\Dev\IDE\Anaconda35\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "D:\Dev\IDE\Anaconda35\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\projects\keras_image_captioning\r-inference.py", line 314, in
fire.Fire(main)
File "D:\Dev\IDE\Anaconda35\lib\site-packages\fire\core.py", line 127, in Fire
component_trace = _Fire(component, args, context, name)
File "D:\Dev\IDE\Anaconda35\lib\site-packages\fire\core.py", line 366, in _Fire
component, remaining_args)
File "D:\Dev\IDE\Anaconda35\lib\site-packages\fire\core.py", line 542, in _CallCallable
result = fn(*varargs, **kwargs)
File "D:\projects\keras_image_captioning\r-inference.py", line 291, in main
max_caption_length=max_caption_length)
File "D:\projects\keras_image_captioning\r-inference.py", line 121, in init
dataset_provider = DatasetProvider(single_caption=True)
File "D:\projects\keras_image_captioning\dataset_providers.py", line 26, in init
get_dataset_instance(single_caption=single_caption))
File "D:\projects\keras_image_captioning\datasets.py", line 133, in get_dataset_instance
single_caption=single_caption)
File "D:\projects\keras_image_captioning\datasets.py", line 77, in init
self._build()
File "D:\projects\keras_image_captioning\datasets.py", line 80, in _build
self._captions_of = self._build_captions()
File "D:\projects\keras_image_captioning\datasets.py", line 97, in _build_captions
for img_filename, caption_txt in lines_splitted:
ValueError: not enough values to unpack (expected 2, got 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant