Accesing asset files from operations

Skip to first unread message

Fernando Neubaum

Mar 18, 2021, 3:52:20 PM3/18/21
to TensorFlow.js Discussion
I'm trying to port the operation InitializeTableFromTextFileV2 to Tensorflow.js, but I don't know how to access the text file from said operation.

I get the filename input argument which is an absolute path ending in .txt , but I don't know how to access that file or where it is. I'm assuming that location points to some place inside the .bin file, but I don't know how to open it. I just need a few pointers as I intend to to create a PR to add the operation, so any help is welcome.

I'm working in Node.js and the model is a saved model converted with the tfjs converter.

Thanks in advance,

Na Li

Mar 19, 2021, 1:38:46 PM3/19/21
to TensorFlow.js Discussion,
Hi Fernando,
TF.js doesn't support this op yet. But if you use Node.js, you can pass SavedModel directly without conversion, and all TF core ops should be available to you:

I think this op will instantiate a hashtable, then there should be other hashtable op to access it, e.g. LookupTableFindV2:


Reply all
Reply to author
0 new messages