clab / clab/dynet

Get selected info from an Expression (pick and select_rows)

Open
#576 3 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
3.4k
Forks
701
PR merge metrics
No merged PRs in 30d

Description

I am trying to get wanted info from an Expression which dim is {{1000}, batch_size} , and I want to input a vector whose value defines as {10,15,23}, each value means the index of 1000 numbers . And I want to get {10, 15, 23 } indices of 1000 for each batch .
And dynet provides **select_rows** which input Expression must be a matrix , and of course it provides **pick**, but the input vector must be 1000 numbers in my examples. And I am using **reshape** to reshape this Expression and **select_rows** to get the value I want . Time multiplies .....
And I am wondering wheather dynet provides pick function from a batch or not ...
Thanks~

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.