We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
大佬您好,目前我用alphaclip输出的image_embedding是一维的,请问我要怎么获得image打成patch过程中二维的patch embedding?是否能有中间这一部分的输出呢?
The text was updated successfully, but these errors were encountered:
可以将被拉长的feature reshape还原成二维,参考这里
nh = attentions.shape[1] attentions = attentions[0, :, 0, 1:].reshape(nh, -1) p_s = int(math.sqrt(attentions.shape[1])) attentions = attentions.reshape(nh, p_s, p_s)
Sorry, something went wrong.
No branches or pull requests
大佬您好,目前我用alphaclip输出的image_embedding是一维的,请问我要怎么获得image打成patch过程中二维的patch embedding?是否能有中间这一部分的输出呢?
The text was updated successfully, but these errors were encountered: