终端输出信息:
```bash
UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor').
time_vector = time_vector // time_win_aggr
代码位置:
```python
def aggregate_by_time(time_vector,time_win_aggr):
time_vector = time_vector - time_vector.min()
time_vector = time_vector // time_win_aggr
return time_vector
解决办法:
把上述代码修改为下述代码即可:
def aggregate_by_time(time_vector,time_win_aggr):
time_vector = time_vector - time_vector.min()
time_vector = torch.div(time_vector, time_win_aggr, rounding_mode='trunc')
return time_vector