@Override public void initFromTensorFlow(NodeDef nodeDef, SameDiff initWith, Map<String, AttrValue> attributesForNode, GraphDef graph) { val attrAxis = nodeDef.getAttrOrThrow("axis"); int axis = (int) attrAxis.getI(); this.axis = axis; addArgs(); }
@Override public void initFromTensorFlow(NodeDef nodeDef, SameDiff initWith, Map<String, AttrValue> attributesForNode, GraphDef graph) { val numSplits = (int) attributesForNode.get("num_split").getI(); this.numSplit = numSplits; val splitDim = TFGraphMapper.getInstance().getArrayFrom(TFGraphMapper.getInstance().getNodeWithNameFromGraph(graph,nodeDef.getInput(0)),graph); if(splitDim != null) { this.splitDim = splitDim.getInt(0); addIArgument(splitDim.getInt(0)); } addIArgument(numSplits); }
@Override public void initFromTensorFlow(NodeDef nodeDef, SameDiff initWith, Map<String, AttrValue> attributesForNode, GraphDef graph) { val numSplits = (int) attributesForNode.get("num_split").getI(); this.numSplit = numSplits; addIArgument(numSplits); val splitDim = TFGraphMapper.getInstance().getArrayFrom(TFGraphMapper.getInstance().getNodeWithNameFromGraph(graph,nodeDef.getInput(0)),graph); if(splitDim != null) { this.splitDim = splitDim.getInt(0); addIArgument(splitDim.getInt(0)); } }
break; case I: val setInt = (int) attr.getI(); if(adapter != null) { adapter.mapAttributeFor(setInt,currentField,on);
hash = (37 * hash) + I_FIELD_NUMBER; hash = (53 * hash) + com.github.os72.protobuf351.Internal.hashLong( getI()); break; case 4:
setI(other.getI()); break;
hash = (37 * hash) + I_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getI()); break; case 4:
private Object getValue(AttrValue v) { switch (v.getValueCase()) { case S: return v.getS().toStringUtf8(); case I: return v.getI(); case F: return v.getF(); case B: return v.getB(); case TYPE: return v.getType().name(); // todo case SHAPE: return v.getShape().toString(); // tdo case TENSOR: return v.getTensor().toString(); // todo handle with prefxied properties case LIST: return v.getList().toString(); // todo getType/Count(idx) and then handle each type with prefixed property case FUNC: return v.getFunc().getAttrMap().toString(); // todo handle recursively case PLACEHOLDER: break; case VALUE_NOT_SET: return null; default: return null; } return null; }
setI(other.getI()); break;