Skip to content

How to make activationFunction for TransformerEncoderBlock constructor ? #2425

Answered by iamuspace
iamuspace asked this question in Q&A
Discussion options

You must be logged in to vote

lambda expression is more easy.

Function<NDList,NDList> activationFunction = x -> Activation.sigmoid(x);

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by iamuspace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant