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

question about the implemtation of motion loss #46

Open
qhanson opened this issue Oct 17, 2022 · 0 comments
Open

question about the implemtation of motion loss #46

qhanson opened this issue Oct 17, 2022 · 0 comments

Comments

@qhanson
Copy link

qhanson commented Oct 17, 2022

split_y = tf.split(y,2,0) #参数分别为:tensor,拆分数,维度
split_y_ = tf.split(y_,2,0) #参数分别为:tensor,拆分数,维度
# print(10)
y0 = split_y[0]
y1 = split_y[1]
y_0 = split_y_[0]
y_1 = split_y_[1]
loss_M = 2 * tf.reduce_mean(tf.square(y0 - y1 -y_0 + y_1))

Currenly, the motion loss is not caculated on the adjacent frames. tf.split() only split the tensor to parts greedily.

y0 = y[::2, ...]
y1 = y[1::2, ...]
y_0 = y_[::2, ...]
y_1 = y_[1::2, ...]

This array slice with step 2 can generate adjancet frames.

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

1 participant