chenchongthu / NARRE

This is our implementation of NARRE:Neural Attentional Regression with Review-level Explanations
105 stars 49 forks source link

where is the WORD2VEC=../data/google.bin #1

Open SeekPoint opened 5 years ago

SeekPoint commented 5 years ago

(.venv) mldl@ub1604:~/ub16_prj/NARRE/model$ python train.py I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.so locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.so locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.so locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcuda.so.1 locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcurand.so locally

Parameters: ALLOW_SOFT_PLACEMENT=True BATCH_SIZE=100 DROPOUT_KEEP_PROB=0.5 EMBEDDING_DIM=300 FILTER_SIZES=3 L2_REG_LAMBDA=0.001 LOG_DEVICE_PLACEMENT=False NUM_EPOCHS=40 NUM_FILTERS=100 PARA_DATA=../data/music/music.para TRAIN_DATA=../data/music/music.train VALID_DATA=../data/music/music.test WORD2VEC=../data/google.bin

Loading data... 5541 3568 16 446 32 446 I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero I tensorflow/core/common_runtime/gpu/gpu_device.cc:885] Found device 0 with properties: name: GeForce GTX 950M major: 5 minor: 0 memoryClockRate (GHz) 1.124 pciBusID 0000:01:00.0 Total memory: 3.95GiB Free memory: 3.58GiB I tensorflow/core/common_runtime/gpu/gpu_device.cc:906] DMA: 0 I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 0: Y I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 950M, pci bus id: 0000:01:00.0) Traceback (most recent call last): File "train.py", line 144, in n_latent=32) File "/home/mldl/ub16_prj/NARRE/model/NARRE.py", line 122, in init tf.einsum('ajk,kl->ajl', self.h_drop_u, Wau) + tf.einsum('ajk,kl->ajl', self.iid_a, Wru) + bau), File "/home/mldl/v_py2tf0.12/.venv/local/lib/python2.7/site-packages/tensorflow/python/ops/special_math_ops.py", line 212, in einsum axes_to_sum) File "/home/mldl/v_py2tf0.12/.venv/local/lib/python2.7/site-packages/tensorflow/python/ops/special_math_ops.py", line 341, in _einsum_reduction product = _reshape_if_necessary(product, uncompacted_shape) File "/home/mldl/v_py2tf0.12/.venv/local/lib/python2.7/site-packages/tensorflow/python/ops/special_math_ops.py", line 366, in _reshape_if_necessary return array_ops.reshape(tensor, new_shape) File "/home/mldl/v_py2tf0.12/.venv/local/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 2448, in reshape name=name) File "/home/mldl/v_py2tf0.12/.venv/local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 493, in apply_op raise err TypeError: Expected binary or unicode string, got None (.venv) mldl@ub1604:~/ub16_prj/NARRE/model$ (.venv) mldl@ub1604:~/ub16_prj/NARRE/model$

chenchongthu commented 5 years ago

you can obtain that from https://code.google.com/archive/p/word2vec/

SeekPoint commented 5 years ago

I guess it should be GoogleNews-vectors-negative300.bin however, this error raised yet

chenchongthu commented 5 years ago

yeah, since the original name is too long, we changed it to google.bin. In addition, please make sure that your tensorflow version is 0.12.1. The error may be caused by "tf.einsum". If you use a different version of tensorflow, you can turn to the api of "tf.einsum" for help

SeekPoint commented 5 years ago

(.venv) mldl@ub1604:~/ub16_prj/NARRE/model$ python train.py

Parameters: ALLOW_SOFT_PLACEMENT=True BATCH_SIZE=100 DROPOUT_KEEP_PROB=0.5 EMBEDDING_DIM=300 FILTER_SIZES=3 L2_REG_LAMBDA=0.001 LOG_DEVICE_PLACEMENT=False NUM_EPOCHS=40 NUM_FILTERS=100 PARA_DATA=../data/music/music.para TRAIN_DATA=../data/music/music.train VALID_DATA=../data/music/music.test WORD2VEC=../data/google.bin

Loading data... 5541 3568 16 446 32 446 Traceback (most recent call last): File "train.py", line 144, in n_latent=32) File "/home/mldl/ub16_prj/NARRE/model/NARRE.py", line 122, in init tf.einsum('ajk,kl->ajl', self.h_drop_u, Wau) + tf.einsum('ajk,kl->ajl', self.iid_a, Wru) + bau), File "/home/mldl/v_py2_tf0.12/.venv/local/lib/python2.7/site-packages/tensorflow/python/ops/special_math_ops.py", line 212, in einsum axes_to_sum) File "/home/mldl/v_py2_tf0.12/.venv/local/lib/python2.7/site-packages/tensorflow/python/ops/special_math_ops.py", line 341, in _einsum_reduction product = _reshape_if_necessary(product, uncompacted_shape) File "/home/mldl/v_py2_tf0.12/.venv/local/lib/python2.7/site-packages/tensorflow/python/ops/special_math_ops.py", line 366, in _reshape_if_necessary return array_ops.reshape(tensor, new_shape) File "/home/mldl/v_py2_tf0.12/.venv/local/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 2448, in reshape name=name) File "/home/mldl/v_py2_tf0.12/.venv/local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 493, in apply_op raise err TypeError: Expected binary or unicode string, got None (.venv) mldl@ub1604:~/ub16_prj/NARRE/model$ git remote -v origin https://github.com/chenchongthu/NARRE (fetch) origin https://github.com/chenchongthu/NARRE (push) (.venv) mldl@ub1604:~/ub16_prj/NARRE/model$ python Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import tensorflow as tf tf.version '0.12.1'

it is 0.12.1