@Override public Map<String, CustomOpDescriptor> getCustomOperations() { return backendExecutioner.getCustomOperations(); }
@Override public CustomOpDescriptor getDescriptor() { val map = Nd4j.getExecutioner().getCustomOperations(); return map.get(opName()); }
public static long getOpNum(String name, Op.Type type) { if (type == Op.Type.CUSTOM) return Nd4j.getExecutioner().getCustomOperations().get(name.toLowerCase()).getHash(); else return (long) Nd4j.getOpFactory().getOpNumByName(name); }
return 100L; } else if (type == Op.Type.CUSTOM) { val name2 = Nd4j.getExecutioner().getCustomOperations().get(name.toLowerCase()); if (name2 == null) return 0; return Nd4j.getExecutioner().getCustomOperations().get(name.toLowerCase()).getHash();
/** * This method returns LongHash of the opName() * * @return */ @Override public long opHash() { if (hash == 0) { val map = Nd4j.getExecutioner().getCustomOperations(); val desc = map.get(opName()); if (desc == null) { throw new ND4JIllegalStateException("Op name " + opName() + " is missing!"); } hash = desc.getHash(); } return hash; }
/** * This method takes custom opname, and return Op DynamicCustomOpsBuilder instance * * @param opName * @return */ public static DynamicCustomOpsBuilder builder(String opName) { val map = Nd4j.getExecutioner().getCustomOperations(); val lcName = map.containsKey(opName) ? opName : opName.toLowerCase(); val desc = map.get(lcName); if (desc == null) throw new ND4JIllegalStateException("Unknown operations requested: [" + opName + "]"); return new DynamicCustomOpsBuilder(lcName, desc.getHash(), desc.getNumInputs(), desc.getNumOutputs(), desc.isAllowsInplace(), desc.getNumTArgs(), desc.getNumIArgs()); }
val map = Nd4j.getExecutioner().getCustomOperations();
val map = new HashMap<>(Nd4j.getExecutioner().getCustomOperations()); val set = map.keySet(); set.removeAll(nodeConverters.keySet());