Skip to content

Commit

Permalink
updating the signature for the Embedding() macro
Browse files Browse the repository at this point in the history
  • Loading branch information
William Darling committed Apr 15, 2016
1 parent 60f4b14 commit 3f48557
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/CNTK/BrainScript/CNTKCoreLib/CNTK.core.bs
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ SBFF(in, rows, cols) = [ Eh = Sigmoid(BFF(in, rows, cols).z) ]
MeanVarNorm(feat) = PerDimMeanVarNormalization(feat, Mean(feat), InvStdDev(feat))
LogPrior(labels) = Log(Mean(labels))

Embedding (input, inputDim, embeddingDim, initFrom='fromFile'/*|gaussian|uniform*/, embeddingPath = '', sparseInput = false, learningRateWeight = 0.0) = [
embedding = Transpose (LearnableParameter (inputDim, embeddingDim, learningRateMultiplier = learningRateWeight, init = initFrom, initFromFilePath = embeddingPath))
Embedding (embeddingDim, input, inputDim=input.dim, initFrom='fromFile'/*|gaussian|uniform*/, embeddingPath = '', sparseInput = false, learningRateWeight = 0.0) = [
embedding = Transpose (LearnableParameter (inputDim, embeddingDim, learningRateMultiplier = learningRateWeight, init = initFrom, initFromFilePath = embeddingPath))
lookup = if sparseInput then embedding * input
else GatherPacked (input, embedding)
else GatherPacked (input, embedding)
].lookup
##############################################################################
Expand Down

0 comments on commit 3f48557

Please sign in to comment.