Skip to content

Instantly share code, notes, and snippets.

@psyyz10
Last active January 9, 2018 07:32
Show Gist options
  • Save psyyz10/699bd434626870222c28d20aca5808a0 to your computer and use it in GitHub Desktop.
Save psyyz10/699bd434626870222c28d20aca5808a0 to your computer and use it in GitHub Desktop.
"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