use of org.nd4j.imports.descriptors.properties.adapters.IntArrayIntIndexAdpater in project nd4j by deeplearning4j.
the class Conv3D method attributeAdaptersForFunction.
@Override
public Map<String, Map<String, AttributeAdapter>> attributeAdaptersForFunction() {
Map<String, Map<String, AttributeAdapter>> ret = new LinkedHashMap<>();
Map<String, AttributeAdapter> tfAdapters = new LinkedHashMap<>();
val fields = DifferentialFunctionClassHolder.getInstance().getFieldsForFunction(this);
tfAdapters.put("kT", new ConditionalFieldValueNDArrayShapeAdapter("NDHWC", 0, 2, fields.get("dataFormat")));
tfAdapters.put("kH", new ConditionalFieldValueNDArrayShapeAdapter("NDHWC", 1, 3, fields.get("dataFormat")));
tfAdapters.put("kW", new ConditionalFieldValueNDArrayShapeAdapter("NDHWC", 2, 4, fields.get("dataFormat")));
tfAdapters.put("dT", new IntArrayIntIndexAdpater(1));
tfAdapters.put("dH", new IntArrayIntIndexAdpater(2));
tfAdapters.put("dW", new IntArrayIntIndexAdpater(3));
tfAdapters.put("pT", new IntArrayIntIndexAdpater(1));
tfAdapters.put("pH", new IntArrayIntIndexAdpater(2));
tfAdapters.put("pW", new IntArrayIntIndexAdpater(3));
tfAdapters.put("isValidMode", new StringEqualsAdapter("VALID"));
tfAdapters.put("isNCDHW", new StringEqualsAdapter("NCDHW"));
ret.put(tensorflowName(), tfAdapters);
return ret;
}
use of org.nd4j.imports.descriptors.properties.adapters.IntArrayIntIndexAdpater in project nd4j by deeplearning4j.
the class FullConv3D method attributeAdaptersForFunction.
@Override
public Map<String, Map<String, AttributeAdapter>> attributeAdaptersForFunction() {
Map<String, Map<String, AttributeAdapter>> ret = new LinkedHashMap<>();
Map<String, AttributeAdapter> tfAdapters = new LinkedHashMap<>();
tfAdapters.put("dT", new IntArrayIntIndexAdpater(1));
tfAdapters.put("dW", new IntArrayIntIndexAdpater(2));
tfAdapters.put("dH", new IntArrayIntIndexAdpater(3));
tfAdapters.put("pT", new IntArrayIntIndexAdpater(1));
tfAdapters.put("pW", new IntArrayIntIndexAdpater(2));
tfAdapters.put("pH", new IntArrayIntIndexAdpater(3));
ret.put(tensorflowName(), tfAdapters);
return ret;
}
Aggregations