@Override public void initFromTensorFlow(NodeDef nodeDef, SameDiff initWith, Map<String, AttrValue> attributesForNode, GraphDef graph) { val aAlpha = nodeDef.getAttrOrThrow("alpha"); val aBeta = nodeDef.getAttrOrThrow("beta"); val aBias = nodeDef.getAttrOrThrow("bias"); val aDepth = nodeDef.getAttrOrThrow("depth_radius"); val alpha = aAlpha.getF(); val beta = aBeta.getF(); val bias = aBias.getF(); val depth = aDepth.getF(); LocalResponseNormalizationConfig localResponseNormalizationConfig = LocalResponseNormalizationConfig.builder() .alpha(alpha) .beta(beta) .bias(bias) .depth((int) depth) .build(); this.config = localResponseNormalizationConfig; addArgs(); }
hash = (37 * hash) + F_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits( getF()); break; case 5:
setF(other.getF()); break;
hash = (37 * hash) + F_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits( getF()); break; case 5:
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; }
setF(other.getF()); break;