zhihanyue / ts2vec

A universal time series representation learning framework
MIT License
593 stars 143 forks source link

关于损失函数的问题 #37

Open xuncheng1997 opened 1 year ago

xuncheng1997 commented 1 year ago

作者你好,想请教一个问题,随机裁剪两个上下文后,怎么保证输出序列中out1和out2第一个索引在原始序列中对应的是同一个时间戳,如果不是对应的话,后面计算损失函数感觉和原文提到的不一样。 out1 = self._net(take_per_row(x, crop_offset + crop_eleft, crop_right - crop_eleft)) out1 = out1[:, -crop_l:]

out2 = self._net(take_per_row(x, crop_offset + crop_left, crop_eright - crop_left)) out2 = out2[:, :crop_l]