nijianmo / fit-rec Goto Github PK
View Code? Open in Web Editor NEWCode for WWW 19' paper
Code for WWW 19' paper
I am trying to run heart_rate_aux.py
to reproduce your results and I am getting the following error:
Traceback (most recent call last):
File "C:\Users\syfan\PycharmProjects\fit-rec\venv\lib\site-packages\tensorflow\python\framework\ops.py", line 1864, in _create_c_op
c_op = c_api.TF_FinishOperation(op_desc)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Can not squeeze dim[2], expected a dimension of 1, got 5 for 'lambda_1/Squeeze_1' (op: 'Squeeze') with input shapes: [?,450,5].
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\syfan\PycharmProjects\fit-rec\FitRec\heart_rate_aux.py", line 334, in <module>
main(args)
File "C:\Users\syfan\PycharmProjects\fit-rec\FitRec\heart_rate_aux.py", line 328, in main
my_lstm = keras_endoLSTM(argv, newModel)
File "C:\Users\syfan\PycharmProjects\fit-rec\FitRec\heart_rate_aux.py", line 127, in __init__
self.model = self.build_model(args)
File "C:\Users\syfan\PycharmProjects\fit-rec\FitRec\heart_rate_aux.py", line 150, in build_model
user_embedding = Lambda(lambda y: K.squeeze(y, 2))(user_embedding)
File "C:\Users\syfan\PycharmProjects\fit-rec\venv\lib\site-packages\keras\engine\topology.py", line 550, in __call__
output_shape = self.compute_output_shape(input_shape)
File "C:\Users\syfan\PycharmProjects\fit-rec\venv\lib\site-packages\keras\layers\core.py", line 627, in compute_output_shape
x = self.call(x)
File "C:\Users\syfan\PycharmProjects\fit-rec\venv\lib\site-packages\keras\layers\core.py", line 659, in call
return self.function(inputs, **arguments)
File "C:\Users\syfan\PycharmProjects\fit-rec\FitRec\heart_rate_aux.py", line 150, in <lambda>
user_embedding = Lambda(lambda y: K.squeeze(y, 2))(user_embedding)
File "C:\Users\syfan\PycharmProjects\fit-rec\venv\lib\site-packages\keras\backend\tensorflow_backend.py", line 1771, in squeeze
return tf.squeeze(x, [axis])
File "C:\Users\syfan\PycharmProjects\fit-rec\venv\lib\site-packages\tensorflow\python\util\dispatch.py", line 180, in wrapper
return target(*args, **kwargs)
File "C:\Users\syfan\PycharmProjects\fit-rec\venv\lib\site-packages\tensorflow\python\util\deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "C:\Users\syfan\PycharmProjects\fit-rec\venv\lib\site-packages\tensorflow\python\ops\array_ops.py", line 3162, in squeeze
return gen_array_ops.squeeze(input, axis, name)
File "C:\Users\syfan\PycharmProjects\fit-rec\venv\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 11642, in squeeze
"Squeeze", input=input, squeeze_dims=axis, name=name)
File "C:\Users\syfan\PycharmProjects\fit-rec\venv\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 788, in _apply_op_helper
op_def=op_def)
File "C:\Users\syfan\PycharmProjects\fit-rec\venv\lib\site-packages\tensorflow\python\util\deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "C:\Users\syfan\PycharmProjects\fit-rec\venv\lib\site-packages\tensorflow\python\framework\ops.py", line 3616, in create_op
op_def=op_def)
File "C:\Users\syfan\PycharmProjects\fit-rec\venv\lib\site-packages\tensorflow\python\framework\ops.py", line 2027, in __init__
control_input_ops)
File "C:\Users\syfan\PycharmProjects\fit-rec\venv\lib\site-packages\tensorflow\python\framework\ops.py", line 1867, in _create_c_op
raise ValueError(str(e))
ValueError: Can not squeeze dim[2], expected a dimension of 1, got 5 for 'lambda_1/Squeeze_1' (op: 'Squeeze') with input shapes: [?,450,5].
Process finished with exit code 1
The line that it refers to seems to be this one: user_embedding = Lambda(lambda y: K.squeeze(y, 2))(user_embedding)
Any ideas?
Using tensorflow==1.14.0 and keras==2.0.0 in Python 3.7 on Windows 11.
Thanks for sharing your source codes. But I didn't find the codes of the PERSONALIZED RECOMMENDATION (Section 5 in your paper). If it โs convenient, could you also share this section.
I will be very grateful
Dear authors,
When I run fitrec-attn.py, there is an error with module util (import util as util) at line 13.
Is there any file that needs your upload?
Thank you very much.
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.