GMAN
GMAN copied to clipboard
求指点:如何解决AttributeError: 'numpy.bytes_' object has no attribute 'delta'
utils.py中 timeofday = (Time.hour * 3600 + Time.minute * 60 + Time.second) // Time.freq.delta.total_seconds() 这一句报错
Traceback (most recent call last):
File "/Users/crowd/PycharmProjects/GMAN/METR/train.py", line 55, in
我没有修改过作者源码 请问这个问题大家是怎么解决的
请问您解决了吗,我也是同样的问题
Time.freq.delta.total_seconds()这个换成 数字 300
Time.freq.delta.total_seconds()这个换成 数字 300
请问为什么是300呀?
Time.freq.delta.total_seconds()这个换成 数字 300
请问为什么是300呀? that is because the time slot is 5 mins, i.e. 300 seconds. At corresponding code dividing 300 in order to get the time of day one-hot comes naturally.
In the code change Time.freq.delta.total_seconds()
with args.time_slot*60
.
In the arguments the time_slot is defined in minutes. That's why we are multiplying with 60. I think a more general solution would be to infer the time frequency directly from the h5 df but currently it doesn't seem possible. I couldn't think of more general solution.