You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
这个在Turbo里处理不太方便,可以通过dlpack转化成pytorch tensor,然后用torch的接口处理完再转回来。
turbo tensor -> torch tensor
torch_tensor = dlpack.from_dlpack(turbo_tensor.to_dlpack())
see this file for more detail
turbo_transformers/python/turbo_transformers/layers/return_type.py
torch tensor -> turbo tensor
convert2tt_tensor(t)
see this file for more details: turbo_transformers/python/turbo_transformers/layers/utils.py
你好,想请教一个关于 Tensor 的问题:
假设我现在有一个 {32,128,768} 维度的 Tensor,现在想去掉第二个维度的头尾向量,将 Tensor 的维度变为 {32,126,768},请问有什么好的解决办法吗?
The text was updated successfully, but these errors were encountered: