Skip to content

Commit

Permalink
constParameter(LookupParameter)
Browse files Browse the repository at this point in the history
  • Loading branch information
shuheik committed Jul 2, 2017
1 parent 68c9fc5 commit 61f6bf6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions contrib/swig/dynet_swig.i
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ Expression input(ComputationGraph& g, const Dim& d, const std::vector<unsigned i
Expression parameter(ComputationGraph& g, Parameter p);
Expression parameter(ComputationGraph& g, LookupParameter lp);
Expression const_parameter(ComputationGraph& g, Parameter p);
Expression const_parameter(ComputationGraph& g, LookupParameter lp);
Expression lookup(ComputationGraph& g, LookupParameter p, unsigned index);
Expression lookup(ComputationGraph& g, LookupParameter p, const unsigned* pindex);
Expression const_lookup(ComputationGraph& g, LookupParameter p, unsigned index);
Expand Down
2 changes: 2 additions & 0 deletions contrib/swig/src/main/scala/edu/cmu/dynet/Expression.scala
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ object Expression {
def parameter(lp: LookupParameter): Expression = makeExpr(cg => dn.parameter(cg, lp.lookupParameter), Seq(lp))
def constParameter(p: Parameter): Expression =
makeExpr(cg => dn.const_parameter(cg, p.parameter), Seq(p))
def constParameter(lp: LookupParameter): Expression =
makeExpr(cg => dn.const_parameter(cg, lp.lookupParameter), Seq(lp))

def lookup(p: LookupParameter, index: Long) =
makeExpr(cg => dn.lookup(cg, p.lookupParameter, index), Seq(p))
Expand Down

0 comments on commit 61f6bf6

Please sign in to comment.