Loading bert preprocess model in DLJ #1164
Unanswered
Tacacs-1101
asked this question in
Q&A
Replies: 1 comment 4 replies
-
The So, what Java data types make most sense in your application? Here, you chose |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to load the BERT preprocess model from tensorflow hub in DLJ. I am not able to figure out what to use in
.setTypes() as Input and Output since output from model will be a dictionary . Below is the code i am trying to use in my application. modelUrl is pointing to location on tensorflow hub. The input to this model should be a list of strings and output is a map containing list of tokenized id, token types , attention mask.
Criteria<String[], Map<String, float[][]>> criteria = Criteria.builder()
.setTypes(String[].class, Map<String, float[][]>.class)
.optModelUrls(modelUrl)
.optProgress(new ProgressBar())
.build();
Beta Was this translation helpful? Give feedback.
All reactions