Search in sources :

Example 1 with PropertyMapping

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;
}
Also used : lombok.val(lombok.val) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) PropertyMapping(org.nd4j.imports.descriptors.properties.PropertyMapping) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) Map(java.util.Map) LinkedHashMap(java.util.LinkedHashMap)

Example 2 with PropertyMapping

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;
}
Also used : lombok.val(lombok.val) PropertyMapping(org.nd4j.imports.descriptors.properties.PropertyMapping)

Example 3 with PropertyMapping

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;
}
Also used : lombok.val(lombok.val) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) PropertyMapping(org.nd4j.imports.descriptors.properties.PropertyMapping) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) Map(java.util.Map) LinkedHashMap(java.util.LinkedHashMap)

Example 4 with PropertyMapping

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;
}
Also used : lombok.val(lombok.val) LinkedHashMap(java.util.LinkedHashMap) HashMap(java.util.HashMap) PropertyMapping(org.nd4j.imports.descriptors.properties.PropertyMapping) LinkedHashMap(java.util.LinkedHashMap) Map(java.util.Map) HashMap(java.util.HashMap)

Example 5 with PropertyMapping

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;
}
Also used : lombok.val(lombok.val) PropertyMapping(org.nd4j.imports.descriptors.properties.PropertyMapping)

Aggregations

lombok.val (lombok.val)36 PropertyMapping (org.nd4j.imports.descriptors.properties.PropertyMapping)36 HashMap (java.util.HashMap)13 Map (java.util.Map)13 LinkedHashMap (java.util.LinkedHashMap)8 NoOpNameFoundException (org.nd4j.imports.NoOpNameFoundException)5