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
{{ message }}
Repository navigation
Feature request: user specified default values for nn.Embedding #702
featureA request for a proper, new feature.module: nnRelated to torch.nntriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
I'm trying to create a module that, given an n-dimensional LongTensor returns an n+2 dimensional FloatTensor arranged correspondingly from slices of a 3-dimensional FloatTensor. In theory this can be accomplished with nn.Embedding plus a reshape, except that I need the matrix corresponding to the padding_idx to be the identity matrix instead of a zero matrix. This could be accomplished by allowing the user to specify what default vector is returned corresponding to padding_idx. Would that be possible?
featureA request for a proper, new feature.module: nnRelated to torch.nntriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Activity
soumith commentedon Feb 11, 2017
this is certainly possible to implement, we have to change our C backends slightly to accommodate this. will put it on a list of things to do
Merge pull request #702 from gchanan/conservativeAllocator
Omit else part only when all extents are one. (pytorch#702)
jbschlosser commentedon May 18, 2021
Closing this because it is possible to specify a custom value to use for the vector at
padding_idx. An example of doing so is in the Embedding docs.free space (pytorch#702)
Configure link or close actions for umbrella triage
Configure link or close actions for umbrella triage
Configure link or close actions for umbrella triage
Configure link or close actions for umbrella triage (#202962)
Configure link or close actions for umbrella triage (pytorch#202962)
Configure link or close actions for umbrella triage (pytorch#202962)