public class FlatBuffersMapper extends Object
Modifier and Type | Method and Description |
---|---|
static int |
asFlatNode(@NonNull SameDiff sameDiff,
@NonNull DifferentialFunction node,
@NonNull com.google.flatbuffers.FlatBufferBuilder bufferBuilder,
List<SDVariable> variables,
Map<String,Integer> reverseMap,
Map<String,Integer> forwardMap,
Map<String,Integer> framesMap,
AtomicInteger idCounter,
Integer id) |
static DifferentialFunction |
cloneViaSerialize(SameDiff sd,
DifferentialFunction df) |
static DifferentialFunction |
cloneViaSerialize(SameDiff sd,
DifferentialFunction df,
Map<String,Integer> nameToIdxMap) |
static DifferentialFunction |
fromFlatNode(FlatNode fn) |
static VariableType |
fromVarType(byte varType) |
static byte |
getDataTypeAsByte(DataType type)
This method converts enums for DataType
|
static DataType |
getDataTypeFromByte(byte val)
This method converts enums for DataType
|
static byte |
getFlatOpType(Op.Type type)
This method converts an Op.Type to it's corresponding byte value
|
static long |
getOpNum(String name,
Op.Type type)
This method return operation ID for given op name/type pair.
|
static byte |
getOrderAsByte()
This method returns current byte order for this JVM as libnd4j enum
|
static ByteOrder |
getOrderFromByte(byte val)
This method just converts enums
|
static Op.Type |
getTypeFromByte(byte type)
This method converts enums for Op.Type
|
static Map<String,Object> |
mapFlatPropertiesToFunctionProperties(Iterable<FlatProperties> list) |
static int[] |
mapFunctionPropertiesToFlatProperties(com.google.flatbuffers.FlatBufferBuilder fbb,
Map<String,Object> fnProps) |
static int[] |
mapOrNull(List<String> list,
com.google.flatbuffers.FlatBufferBuilder fbb) |
static byte |
toVarType(VariableType variableType) |
public static byte getDataTypeAsByte(@NonNull DataType type)
public static DataType getDataTypeFromByte(byte val)
public static long getOpNum(String name, Op.Type type)
public static Op.Type getTypeFromByte(byte type)
type
- Byte representing the op typepublic static byte getFlatOpType(Op.Type type)
type
- type to convertpublic static ByteOrder getOrderFromByte(byte val)
public static byte getOrderAsByte()
public static DifferentialFunction fromFlatNode(FlatNode fn)
public static int[] mapFunctionPropertiesToFlatProperties(com.google.flatbuffers.FlatBufferBuilder fbb, Map<String,Object> fnProps)
public static Map<String,Object> mapFlatPropertiesToFunctionProperties(Iterable<FlatProperties> list)
public static int asFlatNode(@NonNull @NonNull SameDiff sameDiff, @NonNull @NonNull DifferentialFunction node, @NonNull @NonNull com.google.flatbuffers.FlatBufferBuilder bufferBuilder, List<SDVariable> variables, Map<String,Integer> reverseMap, Map<String,Integer> forwardMap, Map<String,Integer> framesMap, AtomicInteger idCounter, Integer id)
public static int[] mapOrNull(List<String> list, com.google.flatbuffers.FlatBufferBuilder fbb)
public static DifferentialFunction cloneViaSerialize(SameDiff sd, DifferentialFunction df)
public static DifferentialFunction cloneViaSerialize(SameDiff sd, DifferentialFunction df, Map<String,Integer> nameToIdxMap)
public static byte toVarType(VariableType variableType)
public static VariableType fromVarType(byte varType)
Copyright © 2020. All rights reserved.