Hey folks, I have never really posted anything online but at the moment, I’m all out of ideas.
The thing is, I am trying to run FISM (a classifier or recommender system algorithm) — specifically, this implementation: GitHub - yushuai/FISM: implementation for the paper "FISM: Factored Item Similarity Models for Top-N Recommender Systems" by Tensorflow 1.2. When I apply it to the provided data set (dataset 1: ml_train & ml_test), it works. When I apply it to dataset 2, which I processed myself so that the format is equal to dataset 1, it also works like expected. But, when I apply it to dataset 3, which also has equal formatting, I get an error in tf.multiply: Incompatible shapes: [99,1] and [100,64].
It is so strange to me that the code works for datasets 1 and 2, but not for 3. I have checked the entire dataset and there is nothing out of the ordinary. I have also scoured the internet for answers, but I haven’t been able to find any. So, here’s my plea for help. This particular part is crucial for the success of my research…
I have already tried reducing the size of dataset 3 but to no avail.
Does anyone know why this error is occurring?
=====================================================
Traceback (most recent call last):
File “C:\Users\semye\anaconda3\envs\py3.5\lib\site-packages\tensorflow_core\python\client\session.py”, line 1365, in _do_call
return fn(*args)
File “C:\Users\semye\anaconda3\envs\py3.5\lib\site-packages\tensorflow_core\python\client\session.py”, line 1350, in _run_fn
target_list, run_metadata)
File “C:\Users\semye\anaconda3\envs\py3.5\lib\site-packages\tensorflow_core\python\client\session.py”, line 1443, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Incompatible shapes: [99,1] vs. [100,64]
[[{{node Mul}}]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “model.py”, line 194, in
model.train()
File “model.py”, line 103, in train
hit_ratio, ndcg = self.evaluate(sess)
File “model.py”, line 163, in evaluate
self.neighbour_num: [neighbour_number for _ in x_test]
File “C:\Users\semye\anaconda3\envs\py3.5\lib\site-packages\tensorflow_core\python\client\session.py”, line 956, in run
run_metadata_ptr)
File “C:\Users\semye\anaconda3\envs\py3.5\lib\site-packages\tensorflow_core\python\client\session.py”, line 1180, in _run
feed_dict_tensor, options, run_metadata)
File “C:\Users\semye\anaconda3\envs\py3.5\lib\site-packages\tensorflow_core\python\client\session.py”, line 1359, in _do_run
run_metadata)
File “C:\Users\semye\anaconda3\envs\py3.5\lib\site-packages\tensorflow_core\python\client\session.py”, line 1384, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Incompatible shapes: [99,1] vs. [100,64]
[[node Mul (defined at C:\Users\semye\anaconda3\envs\py3.5\lib\site-packages\tensorflow_core\python\framework\ops.py:1748) ]]
Original stack trace for ‘Mul’:
File “model.py”, line 193, in
model.build_graph()
File “model.py”, line 130, in build_graph
user_repr = tf.multiply(inverse_rated_num, sumvec)
File “C:\Users\semye\anaconda3\envs\py3.5\lib\site-packages\tensorflow_core\python\util\dispatch.py”, line 180, in wrapper
return target(*args, **kwargs)
File “C:\Users\semye\anaconda3\envs\py3.5\lib\site-packages\tensorflow_core\python\ops\math_ops.py”, line 331, in multiply
return gen_math_ops.mul(x, y, name)
File “C:\Users\semye\anaconda3\envs\py3.5\lib\site-packages\tensorflow_core\python\ops\gen_math_ops.py”, line 6701, in mul
“Mul”, x=x, y=y, name=name)
File “C:\Users\semye\anaconda3\envs\py3.5\lib\site-packages\tensorflow_core\python\framework\op_def_library.py”, line 794, in _apply_op_helper
op_def=op_def)
File “C:\Users\semye\anaconda3\envs\py3.5\lib\site-packages\tensorflow_core\python\util\deprecation.py”, line 507, in new_func
return func(*args, **kwargs)
File “C:\Users\semye\anaconda3\envs\py3.5\lib\site-packages\tensorflow_core\python\framework\ops.py”, line 3357, in create_op
attrs, op_def, compute_device)
File “C:\Users\semye\anaconda3\envs\py3.5\lib\site-packages\tensorflow_core\python\framework\ops.py”, line 3426, in _create_op_internal
op_def=op_def)
File “C:\Users\semye\anaconda3\envs\py3.5\lib\site-packages\tensorflow_core\python\framework\ops.py”, line 1748, in init
self._traceback = tf_stack.extract_stack()