8000 How can I use nested tensor with concated tensor? · Issue #453 · pytorch/nestedtensor · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Nov 15, 2022. It is now read-only.
This repository was archived by the owner on Nov 15, 2022. It is now read-only.
How can I use nested tensor with concated tensor? #453
Open
@maxwellzh

Description

@maxwellzh

Say the original data is A=[tensor([1., 2., 3.]), tensor([2.]), tensor([1., 2., 3., 4.])]. For convenience of some other operations, I concat the data into A_cat = tensor([1., 2., 3., 2., 1., 2., 3., 4.]).

Now my question is, how can I multiply A_cat with another tensor like B=tensor([5., 3., 2.]), so that each element of B multiply the each tensor in A. (B has the same length as A). Is there any efficient way with native pytorch or nestedtensor lib?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0