deeprnn / visual_question_answering Goto Github PK
View Code? Open in Web Editor NEWTensorflow implementation of "Dynamic Memory Networks for Visual and Textual Question Answering"
License: MIT License
Tensorflow implementation of "Dynamic Memory Networks for Visual and Textual Question Answering"
License: MIT License
Evaluating the model :python main.py --phase=eval --model_file='/media/varad/ESSENTIAL/Varad/STUDY/SEM_8/VQA/Implementation/Part2/visual_question_answering/120999/120999.npy'
/home/varad/anaconda3/envs/py27/lib/python2.7/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
WARNING:tensorflow:From /home/varad/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/datasets/base.py:198: retry (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version.
Instructions for updating:
Use the retry module or similar alternatives.
2018-04-17 18:10:24.341234: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2018-04-17 18:10:24.416085: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:898] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2018-04-17 18:10:24.416444: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1344] Found device 0 with properties:
name: GeForce 940MX major: 5 minor: 0 memoryClockRate(GHz): 1.189
pciBusID: 0000:01:00.0
totalMemory: 1.96GiB freeMemory: 1.73GiB
2018-04-17 18:10:24.416461: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1423] Adding visible gpu devices: 0
2018-04-17 18:10:24.898355: I tensorflow/core/common_runtime/gpu/gpu_device.cc:911] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-04-17 18:10:24.898382: I tensorflow/core/common_runtime/gpu/gpu_device.cc:917] 0
2018-04-17 18:10:24.898388: I tensorflow/core/common_runtime/gpu/gpu_device.cc:930] 0: N
2018-04-17 18:10:24.898546: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1041] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 1497 MB memory) -> physical GPU (device: 0, name: GeForce 940MX, pci bus id: 0000:01:00.0, compute capability: 5.0)
loading VQA annotations and questions into memory...
0:00:04.244939
creating index...
index created!
Filtering the questions by length...
100%|████████████████████████████████████████████████████████████████████████████████████████████████| 121512/121512 [00:16<00:00, 7572.51it/s]
creating index...
index created!
Filtering the answers by length...
100%|████████████████████████████████████████████████████████████████████████████████████████████████| 121512/121512 [00:15<00:00, 7887.36it/s]
creating index...
index created!
Reading the questions...
Questions read.
Number of questions = 96837
Building the vocabulary...
Vocabulary built.
Number of words = 16077
Processing the questions...
Questions processed.
Building the dataset...
Dataset built.
Building the CNN...
CNN built.
Building the RNN...
RNN built.
Loading the model from /media/varad/ESSENTIAL/Varad/STUDY/SEM_8/VQA/Implementation/Part2/visual_question_answering/120999/120999.npy...
39%|█████████████████████████████████████████▍ | 27/69 [00:11<00:17, 2.38it/s]Traceback (most recent call last):
File "main.py", line 65, in
tf.app.run()
File "/home/varad/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 126, in run
_sys.exit(main(argv))
File "main.py", line 52, in main
model.load(sess, FLAGS.model_file)
File "/media/varad/ESSENTIAL/Varad/STUDY/SEM_8/VQA/Implementation/Part2/visual_question_answering/base_model.py", line 219, in load
sess.run(v.assign(data_dict[v.name]))
File "/home/varad/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/ops/variables.py", line 609, in assign
return state_ops.assign(self._variable, value, use_locking=use_locking)
File "/home/varad/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/ops/state_ops.py", line 281, in assign
validate_shape=validate_shape)
File "/home/varad/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/ops/gen_state_ops.py", line 61, in assign
use_locking=use_locking, name=name)
File "/home/varad/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/home/varad/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3292, in create_op
compute_device=compute_device)
File "/home/varad/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3332, in _create_op_helper
set_shapes_for_outputs(op)
File "/home/varad/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2496, in set_shapes_for_outputs
return _set_shapes_for_outputs(op)
File "/home/varad/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2469, in _set_shapes_for_outputs
shapes = shape_func(op)
File "/home/varad/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2399, in call_with_requiring
return call_cpp_shape_fn(op, require_shape_fn=True)
File "/home/varad/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/framework/common_shapes.py", line 627, in call_cpp_shape_fn
require_shape_fn)
File "/home/varad/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/framework/common_shapes.py", line 691, in _call_cpp_shape_fn_impl
raise ValueError(err.message)
ValueError: Dimension 0 in both shapes must be equal, but are 16077 and 15317. Shapes are [16077,512] and [15317,512]. for 'Assign_27' (op: 'Assign') with input shapes: [16077,512], [15317,512].
HI @DeepRNN
Getting and error "FileNotFoundError: [Errno 2] No such file or directory: './vgg16_no_fc.npy'
" file running the command
python main.py --phase=train --load_cnn --cnn_model_file='./vgg16_no_fc.npy' [--train_cnn]
Receiving segmentation fault at the line
from model import QuestionAnswerer in main.py while training phase.
Does anyone know how to fix this? It would be of great help.
Hi @DeepRNN ,
Hi while i am running "python main.py --phase=train --load_cnn --cnn_model_file='./vgg16_no_fc.npy' [--train_cnn]" this command getting an error
"ValueError: Object arrays cannot be loaded when allow_pickle=False
"
Thanks & Regards,
Manikantha Sekhar
Thanks for your sharing !
Could you please tell me that where is the code to implement the memory network?
Thanks for your help and nice work!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.