@Override
    public Optional<Value> get(String name) {
        for (Onnx.AttributeProto attr : node.getAttributeList()) {
            if (attr.getName().equals(name)) {
                switch (attr.getType()) {
                    case INT: return Optional.of(DoubleValue.frozen(attr.getI()));
                    case FLOAT: return Optional.of(DoubleValue.frozen(attr.getF()));
                    case STRING: return Optional.of(StringValue.frozen(attr.getS().toString()));
                    case TENSOR: return Optional.of(new TensorValue(TensorConverter.toVespaTensor(attr.getT(), TypeConverter.typeFrom(attr.getT()))));
                    default:
                        return Optional.empty();
                }
            }
        }
        return Optional.empty();
    }
Converts Onnx node attributes to Vespa attribute values.

@author lesters
model-integration/src/main/java/ai/vespa/rankingexpression/importer/onnx/AttributeConverter.java