-
public class Utils
-
-
Method Summary
-
-
Method Detail
-
normalizeString
final String normalizeString(String str)
-
parseModelWeights
final static Map<String, MTensor> parseModelWeights(File file)
Parse AppEvents model files.
The model file format is described by following parts:
First 4 bytes: an 32-bit integer encoded in little-endian order for the length of metadata string, denoted by L.
Next L bytes: a JSONObject string for the metadata. Its keys are the name of the weights and its values are the shape of the weight tensors.
Then there are multiple float arrays encoded with the little-endian order for all weight tensors. The arrays are ordered by the lexicographic order of keys in the metadata.
- Parameters:
file
- the model file object
-
-
-
-