clab / clab/dynet

tf.scatter_nd in DyNet

Open
#1,381 2 comments 0 reactions 0 assignees View on GitHub
need more info
Dominant language
C++
Stars
3.4k
Forks
701
PR merge metrics
No merged PRs in 30d

Description

Hi,

I want to implement [a pointer-generator network](https://nlp.stanford.edu/pubs/see2017get.pdf). In this [implementation](https://github.com/abisee/pointer-generator) with TensorFlow, it uses [tf.scatter_nd](https://www.tensorflow.org/api_docs/python/tf/scatter_nd) for calculating probability distributions of words.
Can I reproduce ``tf.scatter_nd`` of TensorFlow with the existing operations of DyNet? I think this [input](http://dynet.readthedocs.io/en/latest/operations.html#_CPPv3N5dynet5inputER16ComputationGraphRK3DimRKNSt6vectorIjEERKNSt6vectorIfEEfP6Device) operation, i.e. SparseInputNode, of DyNet seems to have the similar forward calculation with ``tf.scatter_nd``, but it does not calculate gradients of the given values.

Thank you for your help.

Contributor guide

No contributing guide indexed for this repository

Research direction

Compare TensorFlow's tf.scatter_nd behavior with DyNet's input operation and SparseInputNode, starting from the linked DyNet operations documentation. Check whether the existing operation supports gradients for the supplied values, using the pointer-generator implementation and paper as context. Done means establishing whether existing operations are sufficient or what support would be needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, tensorflow
Domain
machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.