use of org.nd4j.imports.descriptors.properties.PropertyMapping in project nd4j by deeplearning4j.
the class OneHot method mappingsForFunction.
@Override
public Map<String, Map<String, PropertyMapping>> mappingsForFunction() {
Map<String, Map<String, PropertyMapping>> ret = new HashMap<>();
Map<String, PropertyMapping> attrs = new LinkedHashMap<>();
val depth = PropertyMapping.builder().propertyNames(new String[] { "depth" }).tfInputPosition(1).build();
attrs.put("depth", depth);
val on = PropertyMapping.builder().propertyNames(new String[] { "on" }).tfInputPosition(2).build();
attrs.put("on", on);
val off = PropertyMapping.builder().propertyNames(new String[] { "off" }).tfInputPosition(3).build();
attrs.put("off", off);
val axis = PropertyMapping.builder().propertyNames(new String[] { "axis" }).tfAttrName("axis").build();
attrs.put("axis", axis);
ret.put(tensorflowName(), attrs);
return ret;
}
use of org.nd4j.imports.descriptors.properties.PropertyMapping in project nd4j by deeplearning4j.
the class Reshape method mappingsForFunction.
@Override
public Map<String, Map<String, PropertyMapping>> mappingsForFunction() {
Map<String, Map<String, PropertyMapping>> ret = new HashMap<>();
Map<String, PropertyMapping> map = new HashMap<>();
val shapeMapping = PropertyMapping.builder().onnxAttrName("shape").tfInputPosition(-1).propertyNames(new String[] { "shape" }).build();
map.put("shape", shapeMapping);
ret.put(tensorflowName(), map);
ret.put(onnxName(), map);
return ret;
}
use of org.nd4j.imports.descriptors.properties.PropertyMapping in project nd4j by deeplearning4j.
the class SequenceMask method mappingsForFunction.
@Override
public Map<String, Map<String, PropertyMapping>> mappingsForFunction() {
Map<String, Map<String, PropertyMapping>> ret = new HashMap<>();
Map<String, PropertyMapping> attrs = new LinkedHashMap<>();
if (is_static_maxlen) {
val maxLen = PropertyMapping.builder().propertyNames(new String[] { "maxLen" }).tfAttrName("maxlen").build();
attrs.put("maxLen", maxLen);
}
ret.put(tensorflowName(), attrs);
return ret;
}
use of org.nd4j.imports.descriptors.properties.PropertyMapping in project nd4j by deeplearning4j.
the class SplitV method mappingsForFunction.
@Override
public Map<String, Map<String, PropertyMapping>> mappingsForFunction() {
Map<String, Map<String, PropertyMapping>> ret = new HashMap<>();
Map<String, PropertyMapping> map = new HashMap<>();
val splitDim = PropertyMapping.builder().tfInputPosition(-1).propertyNames(new String[] { "splitDim" }).build();
val numSplit = PropertyMapping.builder().tfAttrName("num_split").propertyNames(new String[] { "numSplit" }).build();
map.put("numSplit", numSplit);
map.put("splitDim", splitDim);
ret.put(tensorflowName(), map);
ret.put(onnxName(), map);
return ret;
}
use of org.nd4j.imports.descriptors.properties.PropertyMapping in project nd4j by deeplearning4j.
the class Tile method mappingsForFunction.
@Override
public Map<String, Map<String, PropertyMapping>> mappingsForFunction() {
Map<String, Map<String, PropertyMapping>> ret = new HashMap<>();
Map<String, PropertyMapping> map = new HashMap<>();
val axisMapping = PropertyMapping.builder().onnxAttrName("axis").tfInputPosition(-1).propertyNames(new String[] { "axis" }).build();
map.put("axis", axisMapping);
ret.put(tensorflowName(), map);
ret.put(onnxName(), map);
return ret;
}
Aggregations