Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A question about the code "demo.py" #2

Open
packer-c opened this issue Jul 5, 2022 · 2 comments
Open

A question about the code "demo.py" #2

packer-c opened this issue Jul 5, 2022 · 2 comments

Comments

@packer-c
Copy link

packer-c commented Jul 5, 2022

Hello, thanks for sharing the excellent code.

Could you tell me the meaning of “295” at line 12?
time_coding = np.zeros((num_step, 295, 1), dtype="float32")

Looking forward to your reply.

@alvinzhaowei
Copy link
Owner

Hi, thanks for your question. The 295 is the dimension of one-hot time embedding. As the traffic data is collected every 5 minutes, there are 288 time slots per day (calculated by 24 * 60 / 5). The last 7 positions represent the days of a week. 288 +7 = 295. Cheers.

@packer-c
Copy link
Author

packer-c commented Jul 5, 2022

Thank you for your reply. Understood. I also found more details in your paper.
Have a nice day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants