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

运行报错怎么回事? #16

Open
LGY-111 opened this issue Jun 22, 2021 · 2 comments
Open

运行报错怎么回事? #16

LGY-111 opened this issue Jun 22, 2021 · 2 comments

Comments

@LGY-111
Copy link

LGY-111 commented Jun 22, 2021

运行时候出现了报错:ValueError: initial_value must have a shape specified: Tensor("total_loss_1/eye/set_diag:0", shape=(?, ?), dtype=float32),想请教下怎么修改?
image
debug定位到报错地方为compute_loss_of_similarity()函数

@xlli-2
Copy link

xlli-2 commented Oct 18, 2021

@JackKuo666
Copy link

改为:

similarities = similarities - tf.eye(K.shape(y_pred)[0]) * 1e12  # 排除对角线

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

3 participants