@Override public void initFromTensorFlow(NodeDef nodeDef, SameDiff initWith, Map<String, AttrValue> attributesForNode, GraphDef graph) { super.initFromTensorFlow(nodeDef, initWith, attributesForNode, graph); val isTransposeA = attributesForNode.get("transpose_a").getB(); val isTransposeB = attributesForNode.get("transpose_b").getB(); MMulTranspose mMulTranspose = MMulTranspose.builder() .transposeA(isTransposeA).transposeB(isTransposeB) .build(); this.mMulTranspose = mMulTranspose; val args = args(); for(val arg : args) { if(sameDiff.isPlaceHolder(arg.getVarName()) || arg.getShape() == null) { sameDiff.addPropertyToResolve(this,arg.getVarName()); } } }
case B: if (adapter != null) { adapter.mapAttributeFor(attr.getB(), currentField, on);
switch(type) { case DT_BOOL: valueToSet = attr.getB(); break; case DT_INT8:
hash = (37 * hash) + B_FIELD_NUMBER; hash = (53 * hash) + com.github.os72.protobuf351.Internal.hashBoolean( getB()); break; case 6:
setB(other.getB()); break;
hash = (37 * hash) + B_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getB()); break; case 6:
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; }
setB(other.getB()); break;