Attributes attr(String name, Tensor tensor) {
            Onnx.TensorProto.Builder builder = Onnx.TensorProto.newBuilder();
            tensor.type().dimensions().forEach(d -> builder.addDims(d.size().get()));
            if (tensor.type().valueType() == TensorType.Value.FLOAT) {
                builder.setDataType(Onnx.TensorProto.DataType.FLOAT_VALUE);
                tensor.valueIterator().forEachRemaining(d -> builder.addFloatData(d.floatValue()));
            } else {
                builder.setDataType(Onnx.TensorProto.DataType.DOUBLE_VALUE);
                tensor.valueIterator().forEachRemaining(builder::addDoubleData);
            }
            Onnx.TensorProto val = builder.build();
            nodeBuilder.addAttribute(Onnx.AttributeProto.newBuilder().setName(name).setType(TENSOR).setT(val).build());
            return this;
        }
Unit tests for ONNX operators. The number on the test reflects the minimum
opset number for the operations tested.

@author lesters
model-integration/src/test/java/ai/vespa/rankingexpression/importer/onnx/OnnxOperationsTestCase.java