and I use the data to feed my tensorflow code:
user_batch = tf.placeholder(tf.int32, shape=[None], name="id_user")
item_batch = tf.placeholder(tf.int32, shape=[None], name="id_item")
tag_batch = tf.placeholder(tf.int32,shape=[3,None],name ="id_tag")
rate_batch = tf.placeholder(tf.float32, shape=[None])
and
for i in range(EPOCH_MAX * samples_per_batch):
users, items,tags,rates = next(iter_train)
_, pred_batch = sess.run([train_op, infer], feed_dict={user_batch: users,
item_batch: items,
tag_batch:tags,
rate_batch: rates})`
then it has valueError:
File "/home/ljh/NCF_TF/GMF.py", line 125, in GMF rate_batch: rates}) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 766, in run run_metadata_ptr) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 937, in _run np_val = np.asarray(subfeed_val, dtype=subfeed_dtype) File "/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.py",line 531, in asarray return array(a, dtype, copy=False, order=order) ValueError: setting an array element with a sequence.