Last active
January 9, 2018 07:32
-
-
Save psyyz10/699bd434626870222c28d20aca5808a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"a" should " " in { | |
import com.intel.analytics.bigdl.numeric.NumericFloat | |
val input = Tensor(T(T(0.2f))) | |
val layer = Sequential() | |
.add(Replicate(2, 1, 1)).add(Recurrent().add(RnnCell(1, 1, Tanh(), isInputWithBias = false))) | |
layer.setWeightsBias(Array(Tensor(T(T(0.1f))), Tensor(T(T(-1.2f))), Tensor(T(0.0f)))) | |
val output = layer.forward(input) | |
println(output) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment