From a9b08cc163847eda270b940056035d08311215f0 Mon Sep 17 00:00:00 2001 From: Alex Black Date: Sat, 24 Aug 2019 19:22:36 +1000 Subject: [PATCH] Upgrade protobuf version (#162) * First steps for protobuf version upgrade Signed-off-by: AlexDBlack * Phase 2 Signed-off-by: AlexDBlack * Update imports to shaded protobuf Signed-off-by: AlexDBlack * Version fix Signed-off-by: AlexDBlack * Switch to single execution for protobuf codegen to work around plugin bug Signed-off-by: AlexDBlack * Automatically delete old PB generated files after name change Signed-off-by: Alex Black --- .../nd4j-api-parent/nd4j-api/pom.xml | 92 ++++--- .../functions/DifferentialFunction.java | 10 +- .../nd4j/autodiff/samediff/SDVariable.java | 2 +- .../TensorflowDescriptorParser.java | 2 +- .../imports/graphmapper/BaseGraphMapper.java | 4 +- .../nd4j/imports/graphmapper/GraphMapper.java | 2 +- .../graphmapper/onnx/OnnxGraphMapper.java | 120 ++++----- .../imports/graphmapper/tf/TFGraphMapper.java | 2 +- .../tf/tensors/TFTensorMappers.java | 2 +- .../linalg/api/ops/BaseBroadcastBoolOp.java | 4 +- .../nd4j/linalg/api/ops/BaseBroadcastOp.java | 4 +- .../java/org/nd4j/linalg/api/ops/BaseOp.java | 4 +- .../org/nd4j/linalg/api/ops/BaseReduceOp.java | 4 +- .../nd4j/linalg/api/ops/DynamicCustomOp.java | 4 +- .../java/org/nd4j/linalg/api/ops/NoOp.java | 4 +- .../linalg/api/ops/impl/controlflow/If.java | 4 +- .../api/ops/impl/controlflow/While.java | 4 +- .../impl/layers/ExternalErrorsFunction.java | 4 +- .../linalg/api/ops/impl/layers/Linear.java | 4 +- .../impl/layers/convolution/AvgPooling2D.java | 4 +- .../impl/layers/convolution/AvgPooling3D.java | 4 +- .../impl/layers/convolution/BatchNorm.java | 4 +- .../ops/impl/layers/convolution/Conv1D.java | 2 +- .../ops/impl/layers/convolution/Conv2D.java | 4 +- .../ops/impl/layers/convolution/DeConv2D.java | 4 +- .../layers/convolution/DepthwiseConv2D.java | 4 +- .../LocalResponseNormalization.java | 4 +- .../impl/layers/convolution/MaxPooling2D.java | 4 +- .../impl/layers/convolution/MaxPooling3D.java | 4 +- .../impl/layers/convolution/Pooling2D.java | 4 +- .../ops/impl/layers/recurrent/GRUCell.java | 2 +- .../ops/impl/layers/recurrent/LSTMCell.java | 4 +- .../api/ops/impl/layers/recurrent/SRU.java | 4 +- .../ops/impl/layers/recurrent/SRUCell.java | 4 +- .../nd4j/linalg/api/ops/impl/reduce/Mmul.java | 4 +- .../api/ops/impl/reduce/TensorMmul.java | 4 +- .../linalg/api/ops/impl/shape/Concat.java | 4 +- .../nd4j/linalg/api/ops/impl/shape/Diag.java | 4 +- .../linalg/api/ops/impl/shape/DiagPart.java | 4 +- .../linalg/api/ops/impl/shape/Gather.java | 4 +- .../linalg/api/ops/impl/shape/GatherNd.java | 2 +- .../linalg/api/ops/impl/shape/MergeAvg.java | 4 +- .../linalg/api/ops/impl/shape/MergeMax.java | 4 +- .../linalg/api/ops/impl/shape/MergeSum.java | 4 +- .../api/ops/impl/shape/ParallelStack.java | 4 +- .../nd4j/linalg/api/ops/impl/shape/Rank.java | 4 +- .../linalg/api/ops/impl/shape/Repeat.java | 4 +- .../linalg/api/ops/impl/shape/Reshape.java | 4 +- .../api/ops/impl/shape/SequenceMask.java | 2 +- .../nd4j/linalg/api/ops/impl/shape/Shape.java | 4 +- .../linalg/api/ops/impl/shape/ShapeN.java | 2 +- .../nd4j/linalg/api/ops/impl/shape/Size.java | 2 +- .../nd4j/linalg/api/ops/impl/shape/Stack.java | 4 +- .../linalg/api/ops/impl/shape/Transpose.java | 4 +- .../linalg/api/ops/impl/shape/Unstack.java | 4 +- .../api/ops/impl/shape/bp/ConcatBp.java | 4 +- .../shape/tensorops/TensorArrayConcat.java | 4 +- .../shape/tensorops/TensorArrayGather.java | 4 +- .../impl/shape/tensorops/TensorArrayRead.java | 4 +- .../shape/tensorops/TensorArrayScatter.java | 4 +- .../impl/shape/tensorops/TensorArraySize.java | 4 +- .../shape/tensorops/TensorArraySplit.java | 4 +- .../ops/impl/transforms/clip/ClipByNorm.java | 4 +- .../ops/impl/transforms/clip/ClipByValue.java | 4 +- .../ops/impl/transforms/custom/Assign.java | 4 +- .../ops/impl/transforms/custom/CumProd.java | 4 +- .../ops/impl/transforms/custom/CumSum.java | 4 +- .../api/ops/impl/transforms/custom/Fill.java | 4 +- .../impl/transforms/strict/RectifiedTanh.java | 4 +- .../api/ops/random/impl/DropOutInverted.java | 4 +- .../linalg/api/ops/random/impl/Range.java | 2 +- .../onnx/{onnx-ml.proto3 => onnx-ml.proto} | 0 ...-operators.proto3 => onnx-operators.proto} | 2 +- .../protobuf/onnx/{onnx.proto3 => onnx.proto} | 0 .../conversion/GraphRunnerTest.java | 2 +- .../conversion/GpuGraphRunnerTest.java | 2 +- nd4j/nd4j-shade/pom.xml | 1 + nd4j/nd4j-shade/protobuf/pom.xml | 228 ++++++++++++++++++ .../conversion/TensorflowConversion.java | 2 +- .../conversion/graphrunner/GraphRunner.java | 8 +- 80 files changed, 487 insertions(+), 228 deletions(-) rename nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/protobuf/onnx/{onnx-ml.proto3 => onnx-ml.proto} (100%) rename nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/protobuf/onnx/{onnx-operators.proto3 => onnx-operators.proto} (99%) rename nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/protobuf/onnx/{onnx.proto3 => onnx.proto} (100%) create mode 100644 nd4j/nd4j-shade/protobuf/pom.xml diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/pom.xml b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/pom.xml index 18680e699..21924f80a 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/pom.xml +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/pom.xml @@ -31,10 +31,35 @@ + + + + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + generate-sources + + run + + + + + + + + + + + + com.github.os72 protoc-jar-maven-plugin - 3.5.1.1 + 3.8.0 tensorflow @@ -43,30 +68,14 @@ run - java-shaded - 3.5.1 + 3.8.0 + .proto src/main/protobuf/tf + src/main/protobuf/onnx src/main/protobuf/tf/tensorflow - - main - false - src/main/java/ - - - - onnx - generate-sources - - run - - - java-shaded - .proto3 - 3.5.1 - src/main/protobuf/onnx main @@ -76,6 +85,32 @@ + + + com.google.code.maven-replacer-plugin + replacer + 1.5.3 + + + ${project.build.sourceDirectory}/org/tensorflow/** + ${project.build.sourceDirectory}/tensorflow/** + ${project.build.sourceDirectory}/onnx/** + + com.google.protobuf. + org.nd4j.shade.protobuf. + + + + replace-imports + generate-sources + + replace + + + + + + org.apache.maven.plugins maven-compiler-plugin @@ -148,20 +183,15 @@ ${flatbuffers.version} - + - com.github.os72 - protobuf-java-shaded-351 - 0.9 - - - com.github.os72 - protobuf-java-util-shaded-351 - 0.9 + org.nd4j + protobuf + ${project.version} + org.objenesis objenesis diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/functions/DifferentialFunction.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/functions/DifferentialFunction.java index 2d49ce56f..71bbd26ee 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/functions/DifferentialFunction.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/functions/DifferentialFunction.java @@ -21,7 +21,7 @@ import lombok.Getter; import lombok.Setter; import lombok.extern.slf4j.Slf4j; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.autodiff.samediff.serde.FlatBuffersMapper; @@ -101,10 +101,10 @@ public abstract class DifferentialFunction { /** * Initialize the function from the given - * {@link onnx.OnnxProto3.NodeProto} + * {@link onnx.Onnx.NodeProto} * @param node */ - public DifferentialFunction(SameDiff sameDiff,onnx.OnnxProto3.NodeProto node,Map attributesForNode, OnnxProto3.GraphProto graph) { + public DifferentialFunction(SameDiff sameDiff,onnx.Onnx.NodeProto node,Map attributesForNode, Onnx.GraphProto graph) { this.sameDiff = sameDiff; setInstanceId(); initFromOnnx(node, sameDiff, attributesForNode, graph); @@ -731,13 +731,13 @@ public abstract class DifferentialFunction { /** * Iniitialize the function from the given - * {@link onnx.OnnxProto3.NodeProto} + * {@link onnx.Onnx.NodeProto} * @param node * @param initWith * @param attributesForNode * @param graph */ - public abstract void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph); + public abstract void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph); diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/SDVariable.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/SDVariable.java index a7fb35520..430b4d83a 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/SDVariable.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/SDVariable.java @@ -19,7 +19,7 @@ package org.nd4j.autodiff.samediff; import java.util.Objects; import lombok.*; import lombok.extern.slf4j.Slf4j; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.functions.DifferentialFunction; import org.nd4j.autodiff.samediff.internal.Variable; import org.nd4j.base.Preconditions; diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/descriptors/tensorflow/TensorflowDescriptorParser.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/descriptors/tensorflow/TensorflowDescriptorParser.java index fad55d101..3d0464782 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/descriptors/tensorflow/TensorflowDescriptorParser.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/descriptors/tensorflow/TensorflowDescriptorParser.java @@ -16,7 +16,7 @@ package org.nd4j.imports.descriptors.tensorflow; -import com.github.os72.protobuf351.TextFormat; +import org.nd4j.shade.protobuf.TextFormat; import org.nd4j.linalg.exception.ND4JIllegalStateException; import org.nd4j.linalg.io.ClassPathResource; import org.tensorflow.framework.OpDef; diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/graphmapper/BaseGraphMapper.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/graphmapper/BaseGraphMapper.java index 92c888e0c..fe252aeeb 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/graphmapper/BaseGraphMapper.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/graphmapper/BaseGraphMapper.java @@ -16,8 +16,8 @@ package org.nd4j.imports.graphmapper; -import com.github.os72.protobuf351.Message; -import com.github.os72.protobuf351.TextFormat; +import org.nd4j.shade.protobuf.Message; +import org.nd4j.shade.protobuf.TextFormat; import lombok.extern.slf4j.Slf4j; import lombok.val; import org.apache.commons.io.IOUtils; diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/graphmapper/GraphMapper.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/graphmapper/GraphMapper.java index 8aad0f4d9..2d89a2b07 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/graphmapper/GraphMapper.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/graphmapper/GraphMapper.java @@ -16,7 +16,7 @@ package org.nd4j.imports.graphmapper; -import com.github.os72.protobuf351.Message; +import org.nd4j.shade.protobuf.Message; import org.nd4j.autodiff.functions.DifferentialFunction; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.imports.descriptors.properties.PropertyMapping; diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/graphmapper/onnx/OnnxGraphMapper.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/graphmapper/onnx/OnnxGraphMapper.java index 0bbfece6f..719ac792d 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/graphmapper/onnx/OnnxGraphMapper.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/graphmapper/onnx/OnnxGraphMapper.java @@ -16,13 +16,13 @@ package org.nd4j.imports.graphmapper.onnx; -import com.github.os72.protobuf351.ByteString; -import com.github.os72.protobuf351.Message; +import org.nd4j.shade.protobuf.ByteString; +import org.nd4j.shade.protobuf.Message; import com.google.common.primitives.Floats; import com.google.common.primitives.Ints; import com.google.common.primitives.Longs; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.functions.DifferentialFunction; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; @@ -52,7 +52,7 @@ import java.util.*; * * @author Adam Gibson */ -public class OnnxGraphMapper extends BaseGraphMapper { +public class OnnxGraphMapper extends BaseGraphMapper { private static OnnxGraphMapper INSTANCE = new OnnxGraphMapper(); @@ -64,9 +64,9 @@ public class OnnxGraphMapper extends BaseGraphMapper attributesForNode, OnnxProto3.NodeProto node, OnnxProto3.GraphProto graph) { + public void initFunctionFromProperties(String mappedTfName, DifferentialFunction on, Map attributesForNode, Onnx.NodeProto node, Onnx.GraphProto graph) { val properties = on.mappingsForFunction(); val tfProperties = properties.get(mappedTfName); val fields = DifferentialFunctionClassHolder.getInstance().getFieldsForFunction(on); @@ -170,18 +170,18 @@ public class OnnxGraphMapper extends BaseGraphMapper> propertyMappingsForFunction) { + public void mapProperty(String name, DifferentialFunction on, Onnx.NodeProto node, Onnx.GraphProto graph, SameDiff sameDiff, Map> propertyMappingsForFunction) { val mapping = propertyMappingsForFunction.get(name).get(getTargetMappingForOp(on, node)); val fields = DifferentialFunctionClassHolder.getInstance().getFieldsForFunction(on); /** @@ -263,7 +263,7 @@ public class OnnxGraphMapper extends BaseGraphMapper getControlDependencies(OnnxProto3.NodeProto node) { + public List getControlDependencies(Onnx.NodeProto node) { throw new UnsupportedOperationException("Not yet implemented"); } @Override public void dumpBinaryProtoAsText(File inputFile, File outputFile) { try { - OnnxProto3.ModelProto graphDef = OnnxProto3.ModelProto.parseFrom(new BufferedInputStream(new FileInputStream(inputFile))); + Onnx.ModelProto graphDef = Onnx.ModelProto.parseFrom(new BufferedInputStream(new FileInputStream(inputFile))); BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(outputFile,true)); - for(OnnxProto3.NodeProto node : graphDef.getGraph().getNodeList()) { + for(Onnx.NodeProto node : graphDef.getGraph().getNodeList()) { bufferedWriter.write(node.toString()); } @@ -316,12 +316,12 @@ public class OnnxGraphMapper extends BaseGraphMapper variablesForGraph(OnnxProto3.GraphProto graphProto) { + public Map variablesForGraph(Onnx.GraphProto graphProto) { /** * Need to figure out why * gpu_0/conv1_1 isn't present in VGG */ - Map ret = new HashMap<>(); + Map ret = new HashMap<>(); for(int i = 0; i < graphProto.getInputCount(); i++) { ret.put(graphProto.getInput(i).getName(),graphProto.getInput(i).getType().getTensorType()); } @@ -356,19 +356,19 @@ public class OnnxGraphMapper extends BaseGraphMapper to) { - OnnxProto3.TensorShapeProto.Dimension dim = OnnxProto3.TensorShapeProto.Dimension. + protected void addDummyTensor(String name, Map to) { + Onnx.TensorShapeProto.Dimension dim = Onnx.TensorShapeProto.Dimension. newBuilder() .setDimValue(-1) .build(); - OnnxProto3.TypeProto.Tensor typeProto = OnnxProto3.TypeProto.Tensor.newBuilder() + Onnx.TypeProto.Tensor typeProto = Onnx.TypeProto.Tensor.newBuilder() .setShape( - OnnxProto3.TensorShapeProto.newBuilder() + Onnx.TensorShapeProto.newBuilder() .addDim(dim) .addDim(dim).build()) .build(); @@ -377,23 +377,23 @@ public class OnnxGraphMapper extends BaseGraphMapper importState, - OpImportOverride opImportOverride, - OpImportFilter opFilter) { + public void mapNodeType(Onnx.NodeProto tfNode, ImportState importState, + OpImportOverride opImportOverride, + OpImportFilter opFilter) { val differentialFunction = DifferentialFunctionClassHolder.getInstance().getOpWithOnnxName(tfNode.getOpType()); if(differentialFunction == null) { throw new NoOpNameFoundException("No op name found " + tfNode.getOpType()); @@ -425,13 +425,13 @@ public class OnnxGraphMapper extends BaseGraphMapper= 2) @@ -548,11 +548,11 @@ public class OnnxGraphMapper extends BaseGraphMapper= 2) @@ -577,74 +577,74 @@ public class OnnxGraphMapper extends BaseGraphMapper getAttrMap(OnnxProto3.NodeProto nodeProto) { - Map proto = new HashMap<>(); + public Map getAttrMap(Onnx.NodeProto nodeProto) { + Map proto = new HashMap<>(); for(int i = 0; i < nodeProto.getAttributeCount(); i++) { - OnnxProto3.AttributeProto attributeProto = nodeProto.getAttribute(i); + Onnx.AttributeProto attributeProto = nodeProto.getAttribute(i); proto.put(attributeProto.getName(),attributeProto); } return proto; } @Override - public String getName(OnnxProto3.NodeProto nodeProto) { + public String getName(Onnx.NodeProto nodeProto) { return nodeProto.getName(); } @Override - public boolean alreadySeen(OnnxProto3.NodeProto nodeProto) { + public boolean alreadySeen(Onnx.NodeProto nodeProto) { return false; } @Override - public boolean isVariableNode(OnnxProto3.NodeProto nodeProto) { + public boolean isVariableNode(Onnx.NodeProto nodeProto) { return nodeProto.getOpType().contains("Var"); } @Override - public boolean shouldSkip(OnnxProto3.NodeProto opType) { + public boolean shouldSkip(Onnx.NodeProto opType) { return false; } @Override - public boolean hasShape(OnnxProto3.NodeProto nodeProto) { + public boolean hasShape(Onnx.NodeProto nodeProto) { return false; } @Override - public long[] getShape(OnnxProto3.NodeProto nodeProto) { + public long[] getShape(Onnx.NodeProto nodeProto) { return null; } @Override - public INDArray getArrayFrom(OnnxProto3.NodeProto nodeProto, OnnxProto3.GraphProto graph) { + public INDArray getArrayFrom(Onnx.NodeProto nodeProto, Onnx.GraphProto graph) { return null; } @Override - public String getOpType(OnnxProto3.NodeProto nodeProto) { + public String getOpType(Onnx.NodeProto nodeProto) { return nodeProto.getOpType(); } @Override - public List getNodeList(OnnxProto3.GraphProto graphProto) { + public List getNodeList(Onnx.GraphProto graphProto) { return graphProto.getNodeList(); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/graphmapper/tf/TFGraphMapper.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/graphmapper/tf/TFGraphMapper.java index 5579569c3..f57fef4c7 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/graphmapper/tf/TFGraphMapper.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/graphmapper/tf/TFGraphMapper.java @@ -16,7 +16,7 @@ package org.nd4j.imports.graphmapper.tf; -import com.github.os72.protobuf351.Message; +import org.nd4j.shade.protobuf.Message; import com.google.common.primitives.Floats; import com.google.common.primitives.Ints; import lombok.extern.slf4j.Slf4j; diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/graphmapper/tf/tensors/TFTensorMappers.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/graphmapper/tf/tensors/TFTensorMappers.java index 722168541..e9a99c6c0 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/graphmapper/tf/tensors/TFTensorMappers.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/graphmapper/tf/tensors/TFTensorMappers.java @@ -1,6 +1,6 @@ package org.nd4j.imports.graphmapper.tf.tensors; -import com.github.os72.protobuf351.Descriptors; +import org.nd4j.shade.protobuf.Descriptors; import org.bytedeco.javacpp.indexer.Bfloat16ArrayIndexer; import org.bytedeco.javacpp.indexer.HalfIndexer; import org.nd4j.linalg.api.buffer.DataType; diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/BaseBroadcastBoolOp.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/BaseBroadcastBoolOp.java index a844b04c7..a41dc8790 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/BaseBroadcastBoolOp.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/BaseBroadcastBoolOp.java @@ -19,7 +19,7 @@ package org.nd4j.linalg.api.ops; import lombok.NoArgsConstructor; import lombok.extern.slf4j.Slf4j; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -205,7 +205,7 @@ public abstract class BaseBroadcastBoolOp extends BaseOp implements BroadcastOp @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/BaseBroadcastOp.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/BaseBroadcastOp.java index d65ff377e..7f0d7e40c 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/BaseBroadcastOp.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/BaseBroadcastOp.java @@ -19,7 +19,7 @@ package org.nd4j.linalg.api.ops; import lombok.NoArgsConstructor; import lombok.extern.slf4j.Slf4j; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -200,7 +200,7 @@ public abstract class BaseBroadcastOp extends BaseOp implements BroadcastOp { @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/BaseOp.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/BaseOp.java index 925a5924f..8c9cdf4e0 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/BaseOp.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/BaseOp.java @@ -20,7 +20,7 @@ import lombok.Data; import lombok.Getter; import lombok.Setter; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.functions.DifferentialFunction; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; @@ -134,7 +134,7 @@ public abstract class BaseOp extends DifferentialFunction implements Op { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { } @Override diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/BaseReduceOp.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/BaseReduceOp.java index ebf9b9c18..7fc0679db 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/BaseReduceOp.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/BaseReduceOp.java @@ -21,7 +21,7 @@ import lombok.Getter; import lombok.Setter; import lombok.extern.slf4j.Slf4j; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.imports.graphmapper.onnx.OnnxGraphMapper; @@ -218,7 +218,7 @@ public abstract class BaseReduceOp extends BaseOp implements ReduceOp { @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { if (!attributesForNode.containsKey("axes")) { this.dimensions = new int[] { Integer.MAX_VALUE }; } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/DynamicCustomOp.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/DynamicCustomOp.java index 9b5b190c1..f52450eee 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/DynamicCustomOp.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/DynamicCustomOp.java @@ -21,7 +21,7 @@ import com.google.common.primitives.Doubles; import com.google.common.primitives.Longs; import lombok.*; import lombok.extern.slf4j.Slf4j; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.functions.DifferentialFunction; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; @@ -603,7 +603,7 @@ public class DynamicCustomOp extends DifferentialFunction implements CustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/NoOp.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/NoOp.java index 19d8fe987..6b174bd07 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/NoOp.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/NoOp.java @@ -16,7 +16,7 @@ package org.nd4j.linalg.api.ops; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.linalg.api.buffer.DataType; @@ -61,7 +61,7 @@ public class NoOp extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/controlflow/If.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/controlflow/If.java index 6e0db97a5..03dc26313 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/controlflow/If.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/controlflow/If.java @@ -18,7 +18,7 @@ package org.nd4j.linalg.api.ops.impl.controlflow; import lombok.*; import lombok.extern.slf4j.Slf4j; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.functions.DifferentialFunction; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; @@ -367,7 +367,7 @@ public class If extends DifferentialFunction implements CustomOp { @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/controlflow/While.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/controlflow/While.java index eba0e1145..e26b0ea5f 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/controlflow/While.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/controlflow/While.java @@ -18,7 +18,7 @@ package org.nd4j.linalg.api.ops.impl.controlflow; import lombok.*; import lombok.extern.slf4j.Slf4j; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.functions.DifferentialFunction; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; @@ -468,7 +468,7 @@ public class While extends DifferentialFunction implements CustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/ExternalErrorsFunction.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/ExternalErrorsFunction.java index 378fbb06b..fd2134aad 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/ExternalErrorsFunction.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/ExternalErrorsFunction.java @@ -16,7 +16,7 @@ package org.nd4j.linalg.api.ops.impl.layers; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.functions.DifferentialFunction; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; @@ -122,7 +122,7 @@ public class ExternalErrorsFunction extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/Linear.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/Linear.java index da2c26f54..27f357b4b 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/Linear.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/Linear.java @@ -19,7 +19,7 @@ package org.nd4j.linalg.api.ops.impl.layers; import lombok.Builder; import lombok.NoArgsConstructor; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.functions.DifferentialFunction; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; @@ -96,7 +96,7 @@ public class Linear extends BaseModule { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/AvgPooling2D.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/AvgPooling2D.java index 3198a6a56..ac13c6224 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/AvgPooling2D.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/AvgPooling2D.java @@ -21,7 +21,7 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.extern.slf4j.Slf4j; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -260,7 +260,7 @@ public class AvgPooling2D extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { val paddingVal = !attributesForNode.containsKey("auto_pad") ? "VALID" : attributesForNode.get("auto_pad").getS().toStringUtf8(); val kernelShape = attributesForNode.get("kernel_shape").getIntsList(); val padding = !attributesForNode.containsKey("pads") ? Arrays.asList(1L) : attributesForNode.get("pads").getIntsList(); diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/AvgPooling3D.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/AvgPooling3D.java index 2c57c68de..6f58884f0 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/AvgPooling3D.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/AvgPooling3D.java @@ -18,7 +18,7 @@ package org.nd4j.linalg.api.ops.impl.layers.convolution; import lombok.Getter; import lombok.extern.slf4j.Slf4j; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -78,7 +78,7 @@ public class AvgPooling3D extends Pooling3D { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { throw new UnsupportedOperationException("Not yet implemented"); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/BatchNorm.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/BatchNorm.java index 67fc9f3a5..bad975cb5 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/BatchNorm.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/BatchNorm.java @@ -21,7 +21,7 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.extern.slf4j.Slf4j; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.autodiff.samediff.internal.SameDiffOp; @@ -139,7 +139,7 @@ public class BatchNorm extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { OnnxGraphMapper.getInstance().initFunctionFromProperties(node.getOpType(), this, attributesForNode, node, graph); addArgs(); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/Conv1D.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/Conv1D.java index 3d61de716..5ae2ac144 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/Conv1D.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/Conv1D.java @@ -21,7 +21,7 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.extern.slf4j.Slf4j; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/Conv2D.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/Conv2D.java index 4335f4561..04db5874c 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/Conv2D.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/Conv2D.java @@ -21,7 +21,7 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.extern.slf4j.Slf4j; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -127,7 +127,7 @@ public class Conv2D extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { OnnxGraphMapper.getInstance().initFunctionFromProperties(node.getOpType(), this, attributesForNode, node, graph); addArgs(); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/DeConv2D.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/DeConv2D.java index 6cba853d0..65c0fccc3 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/DeConv2D.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/DeConv2D.java @@ -21,7 +21,7 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.extern.slf4j.Slf4j; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -247,7 +247,7 @@ public class DeConv2D extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { val autoPad = !attributesForNode.containsKey("auto_pad") ? "VALID" : attributesForNode.get("auto_pad").getS().toStringUtf8(); val dilations = attributesForNode.get("dilations"); val dilationY = dilations == null ? 1 : dilations.getIntsList().get(0).intValue(); diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/DepthwiseConv2D.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/DepthwiseConv2D.java index 0ea84e081..92a39f188 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/DepthwiseConv2D.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/DepthwiseConv2D.java @@ -20,7 +20,7 @@ import lombok.Builder; import lombok.Getter; import lombok.extern.slf4j.Slf4j; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -151,7 +151,7 @@ public class DepthwiseConv2D extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { OnnxGraphMapper.getInstance().initFunctionFromProperties(node.getOpType(), this, attributesForNode, node, graph); addArgs(); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/LocalResponseNormalization.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/LocalResponseNormalization.java index de4e763bc..421598d13 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/LocalResponseNormalization.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/LocalResponseNormalization.java @@ -21,7 +21,7 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.extern.slf4j.Slf4j; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -115,7 +115,7 @@ public class LocalResponseNormalization extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { val aAlpha = attributesForNode.get("alpha"); val aBeta = attributesForNode.get("beta"); val aBias = attributesForNode.get("bias"); diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/MaxPooling2D.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/MaxPooling2D.java index f996fc29f..b321334a5 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/MaxPooling2D.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/MaxPooling2D.java @@ -21,7 +21,7 @@ import lombok.Getter; import lombok.NonNull; import lombok.extern.slf4j.Slf4j; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -221,7 +221,7 @@ public class MaxPooling2D extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { val paddingVal = !attributesForNode.containsKey("auto_pad") ? "VALID" : attributesForNode.get("auto_pad").getS().toStringUtf8(); val isSameNode = paddingVal.equals("SAME"); val kernelShape = attributesForNode.get("kernel_shape").getIntsList(); diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/MaxPooling3D.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/MaxPooling3D.java index a243dec9b..99d73d2af 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/MaxPooling3D.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/MaxPooling3D.java @@ -18,7 +18,7 @@ package org.nd4j.linalg.api.ops.impl.layers.convolution; import lombok.Getter; import lombok.extern.slf4j.Slf4j; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -78,7 +78,7 @@ public class MaxPooling3D extends Pooling3D { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { throw new UnsupportedOperationException("Not yet implemented"); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/Pooling2D.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/Pooling2D.java index f7f21e78d..c45d106e7 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/Pooling2D.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/Pooling2D.java @@ -20,7 +20,7 @@ import lombok.Builder; import lombok.Getter; import lombok.extern.slf4j.Slf4j; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -183,7 +183,7 @@ public class Pooling2D extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { val isSameNode = attributesForNode.get("auto_pad").getS().equals("SAME"); val kernelShape = attributesForNode.get("kernel_shape").getIntsList(); val padding = attributesForNode.get("pads").getIntsList(); diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/recurrent/GRUCell.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/recurrent/GRUCell.java index 678a4afef..6c7daca69 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/recurrent/GRUCell.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/recurrent/GRUCell.java @@ -16,7 +16,7 @@ package org.nd4j.linalg.api.ops.impl.layers.recurrent; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/recurrent/LSTMCell.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/recurrent/LSTMCell.java index 1fdd6b191..e9d2ffd3b 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/recurrent/LSTMCell.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/recurrent/LSTMCell.java @@ -16,7 +16,7 @@ package org.nd4j.linalg.api.ops.impl.layers.recurrent; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.linalg.api.ops.DynamicCustomOp; import org.nd4j.linalg.api.ops.impl.layers.recurrent.config.LSTMCellConfiguration; @@ -73,7 +73,7 @@ public class LSTMCell extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/recurrent/SRU.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/recurrent/SRU.java index aaac14131..b916d4961 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/recurrent/SRU.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/recurrent/SRU.java @@ -16,7 +16,7 @@ package org.nd4j.linalg.api.ops.impl.layers.recurrent; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.imports.NoOpNameFoundException; import org.nd4j.linalg.api.ops.DynamicCustomOp; @@ -65,7 +65,7 @@ public class SRU extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { super.initFromOnnx(node, initWith, attributesForNode, graph); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/recurrent/SRUCell.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/recurrent/SRUCell.java index 625e09e91..4880b90fe 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/recurrent/SRUCell.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/recurrent/SRUCell.java @@ -16,7 +16,7 @@ package org.nd4j.linalg.api.ops.impl.layers.recurrent; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.imports.NoOpNameFoundException; import org.nd4j.linalg.api.ops.DynamicCustomOp; @@ -66,7 +66,7 @@ public class SRUCell extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { super.initFromOnnx(node, initWith, attributesForNode, graph); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/reduce/Mmul.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/reduce/Mmul.java index 00cad1f88..7d711ca58 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/reduce/Mmul.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/reduce/Mmul.java @@ -18,7 +18,7 @@ package org.nd4j.linalg.api.ops.impl.reduce; import lombok.EqualsAndHashCode; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -204,7 +204,7 @@ public class Mmul extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { val isTransposeA = !attributesForNode.containsKey("transA") ? false : attributesForNode.get("transA").getI() > 0; val isTransposeB = !attributesForNode.containsKey("transB") ? false : attributesForNode.get("transB").getI() > 0; MMulTranspose mMulTranspose = MMulTranspose.builder() diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/reduce/TensorMmul.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/reduce/TensorMmul.java index 62e373832..3de44537a 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/reduce/TensorMmul.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/reduce/TensorMmul.java @@ -20,7 +20,7 @@ import com.google.common.primitives.Ints; import com.google.common.primitives.Longs; import lombok.NoArgsConstructor; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.linalg.api.blas.params.MMulTranspose; @@ -283,7 +283,7 @@ public class TensorMmul extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { val isTransposeA = !attributesForNode.containsKey("transA") ? false : attributesForNode.get("transA").getI() > 0; val isTransposeB = !attributesForNode.containsKey("transB") ? false : attributesForNode.get("transB").getI() > 0; MMulTranspose mMulTranspose = MMulTranspose.builder() diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Concat.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Concat.java index e0b0450d3..5c6beb945 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Concat.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Concat.java @@ -18,7 +18,7 @@ package org.nd4j.linalg.api.ops.impl.shape; import lombok.extern.slf4j.Slf4j; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -163,7 +163,7 @@ public class Concat extends DynamicCustomOp { @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { super.initFromOnnx(node, initWith, attributesForNode, graph); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Diag.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Diag.java index 90aed14bf..b6d08784b 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Diag.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Diag.java @@ -16,7 +16,7 @@ package org.nd4j.linalg.api.ops.impl.shape; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -77,7 +77,7 @@ public class Diag extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { super.initFromOnnx(node, initWith, attributesForNode, graph); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/DiagPart.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/DiagPart.java index d2807e36d..6b1688602 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/DiagPart.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/DiagPart.java @@ -16,7 +16,7 @@ package org.nd4j.linalg.api.ops.impl.shape; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -79,7 +79,7 @@ public class DiagPart extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { super.initFromOnnx(node, initWith, attributesForNode, graph); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Gather.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Gather.java index 1782f75df..31718d337 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Gather.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Gather.java @@ -18,7 +18,7 @@ package org.nd4j.linalg.api.ops.impl.shape; import lombok.NoArgsConstructor; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.imports.descriptors.properties.PropertyMapping; @@ -78,7 +78,7 @@ public class Gather extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { OnnxGraphMapper.getInstance().initFunctionFromProperties(node.getOpType(), this, attributesForNode, node, graph); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/GatherNd.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/GatherNd.java index 1be7c56bf..cfe4fe8be 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/GatherNd.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/GatherNd.java @@ -18,7 +18,7 @@ package org.nd4j.linalg.api.ops.impl.shape; import lombok.NoArgsConstructor; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/MergeAvg.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/MergeAvg.java index d8319cab2..ec86c6553 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/MergeAvg.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/MergeAvg.java @@ -17,7 +17,7 @@ package org.nd4j.linalg.api.ops.impl.shape; import lombok.extern.slf4j.Slf4j; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -65,7 +65,7 @@ public class MergeAvg extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { super.initFromOnnx(node, initWith, attributesForNode, graph); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/MergeMax.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/MergeMax.java index c9118990c..046f06c3c 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/MergeMax.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/MergeMax.java @@ -18,7 +18,7 @@ package org.nd4j.linalg.api.ops.impl.shape; import lombok.extern.slf4j.Slf4j; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -64,7 +64,7 @@ public class MergeMax extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { super.initFromOnnx(node, initWith, attributesForNode, graph); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/MergeSum.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/MergeSum.java index b7c370615..6b87ca5c8 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/MergeSum.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/MergeSum.java @@ -18,7 +18,7 @@ package org.nd4j.linalg.api.ops.impl.shape; import lombok.extern.slf4j.Slf4j; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -66,7 +66,7 @@ public class MergeSum extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { super.initFromOnnx(node, initWith, attributesForNode, graph); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/ParallelStack.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/ParallelStack.java index 8d7dcf6a6..1856e6804 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/ParallelStack.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/ParallelStack.java @@ -17,7 +17,7 @@ package org.nd4j.linalg.api.ops.impl.shape; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -68,7 +68,7 @@ public class ParallelStack extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { throw new UnsupportedOperationException("No analog found for onnx for " + opName()); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Rank.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Rank.java index 96f28dbf1..aacfa19e1 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Rank.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Rank.java @@ -18,7 +18,7 @@ package org.nd4j.linalg.api.ops.impl.shape; import lombok.extern.slf4j.Slf4j; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -66,7 +66,7 @@ public class Rank extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Repeat.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Repeat.java index 14d67d912..02f8f9445 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Repeat.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Repeat.java @@ -18,7 +18,7 @@ package org.nd4j.linalg.api.ops.impl.shape; import lombok.NoArgsConstructor; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -106,7 +106,7 @@ public class Repeat extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { super.initFromOnnx(node, initWith, attributesForNode, graph); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Reshape.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Reshape.java index 42e401859..b30bacc22 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Reshape.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Reshape.java @@ -18,7 +18,7 @@ package org.nd4j.linalg.api.ops.impl.shape; import lombok.extern.slf4j.Slf4j; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -126,7 +126,7 @@ public class Reshape extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { val shape = new OnnxGraphMapper().getShape(node); this.shape = shape; } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/SequenceMask.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/SequenceMask.java index 5faa82609..a2f6bd208 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/SequenceMask.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/SequenceMask.java @@ -18,7 +18,7 @@ package org.nd4j.linalg.api.ops.impl.shape; import lombok.NoArgsConstructor; import lombok.val; -import onnx.OnnxMlProto3; +import onnx.OnnxMl; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Shape.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Shape.java index a1133ee82..6cd2eec06 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Shape.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Shape.java @@ -17,7 +17,7 @@ package org.nd4j.linalg.api.ops.impl.shape; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.autodiff.samediff.serde.FlatBuffersMapper; @@ -87,7 +87,7 @@ public class Shape extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { throw new NoOpNameFoundException("No onnx name found for shape " + opName()); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/ShapeN.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/ShapeN.java index 241cc950f..55d9dd806 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/ShapeN.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/ShapeN.java @@ -16,7 +16,7 @@ package org.nd4j.linalg.api.ops.impl.shape; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Size.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Size.java index 1ba9156bc..71b52a92a 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Size.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Size.java @@ -16,7 +16,7 @@ package org.nd4j.linalg.api.ops.impl.shape; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Stack.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Stack.java index 44cb0539c..6cd09f9bd 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Stack.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Stack.java @@ -17,7 +17,7 @@ package org.nd4j.linalg.api.ops.impl.shape; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -93,7 +93,7 @@ public class Stack extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { throw new UnsupportedOperationException("No analog found for onnx for " + opName()); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Transpose.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Transpose.java index 965d071c3..2de0a29c5 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Transpose.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Transpose.java @@ -18,7 +18,7 @@ package org.nd4j.linalg.api.ops.impl.shape; import com.google.common.primitives.Ints; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.autodiff.samediff.VariableType; @@ -156,7 +156,7 @@ public class Transpose extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { if (!attributesForNode.containsKey("perm")) { } else diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Unstack.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Unstack.java index 3d7e07a72..9dd6b6338 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Unstack.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/Unstack.java @@ -17,7 +17,7 @@ package org.nd4j.linalg.api.ops.impl.shape; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -127,7 +127,7 @@ public class Unstack extends DynamicCustomOp { @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { throw new UnsupportedOperationException("No analog found for onnx for " + opName()); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/bp/ConcatBp.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/bp/ConcatBp.java index ead0f2747..70bc1b087 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/bp/ConcatBp.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/bp/ConcatBp.java @@ -18,7 +18,7 @@ package org.nd4j.linalg.api.ops.impl.shape.bp; import lombok.extern.slf4j.Slf4j; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -71,7 +71,7 @@ public class ConcatBp extends DynamicCustomOp { @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { //No op } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArrayConcat.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArrayConcat.java index 07bdab586..7759f96dd 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArrayConcat.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArrayConcat.java @@ -16,7 +16,7 @@ package org.nd4j.linalg.api.ops.impl.shape.tensorops; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.imports.NoOpNameFoundException; @@ -59,7 +59,7 @@ public class TensorArrayConcat extends BaseTensorOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { throw new UnsupportedOperationException(); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArrayGather.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArrayGather.java index 3ab0d91c9..9e7669725 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArrayGather.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArrayGather.java @@ -16,7 +16,7 @@ package org.nd4j.linalg.api.ops.impl.shape.tensorops; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.imports.NoOpNameFoundException; @@ -59,7 +59,7 @@ public class TensorArrayGather extends BaseTensorOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { throw new UnsupportedOperationException(); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArrayRead.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArrayRead.java index 619216813..6d8cff91c 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArrayRead.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArrayRead.java @@ -16,7 +16,7 @@ package org.nd4j.linalg.api.ops.impl.shape.tensorops; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.functions.DifferentialFunction; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; @@ -54,7 +54,7 @@ public class TensorArrayRead extends BaseTensorOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { } @Override diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArrayScatter.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArrayScatter.java index add288d89..9e1d93e2f 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArrayScatter.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArrayScatter.java @@ -16,7 +16,7 @@ package org.nd4j.linalg.api.ops.impl.shape.tensorops; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.linalg.api.buffer.DataType; @@ -52,7 +52,7 @@ public class TensorArrayScatter extends BaseTensorOp { @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { } @Override diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArraySize.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArraySize.java index 9734515d3..276dadcab 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArraySize.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArraySize.java @@ -16,7 +16,7 @@ package org.nd4j.linalg.api.ops.impl.shape.tensorops; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.imports.descriptors.properties.PropertyMapping; import org.nd4j.linalg.api.buffer.DataType; @@ -58,7 +58,7 @@ public class TensorArraySize extends BaseTensorOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { } @Override diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArraySplit.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArraySplit.java index fb52c78a7..589805641 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArraySplit.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/shape/tensorops/TensorArraySplit.java @@ -16,7 +16,7 @@ package org.nd4j.linalg.api.ops.impl.shape.tensorops; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.linalg.api.buffer.DataType; @@ -52,7 +52,7 @@ public class TensorArraySplit extends BaseTensorOp { @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { } @Override diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/clip/ClipByNorm.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/clip/ClipByNorm.java index 1cda0257d..59b7ec2f5 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/clip/ClipByNorm.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/clip/ClipByNorm.java @@ -16,7 +16,7 @@ package org.nd4j.linalg.api.ops.impl.transforms.clip; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -64,7 +64,7 @@ public class ClipByNorm extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { throw new UnsupportedOperationException("Not yet implemented"); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/clip/ClipByValue.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/clip/ClipByValue.java index d25b0df62..11d3e9004 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/clip/ClipByValue.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/clip/ClipByValue.java @@ -16,7 +16,7 @@ package org.nd4j.linalg.api.ops.impl.transforms.clip; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -77,7 +77,7 @@ public class ClipByValue extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { throw new UnsupportedOperationException("Not yet implemented"); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/custom/Assign.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/custom/Assign.java index 7ca0b342a..35c209870 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/custom/Assign.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/custom/Assign.java @@ -16,7 +16,7 @@ package org.nd4j.linalg.api.ops.impl.transforms.custom; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -62,7 +62,7 @@ public class Assign extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { super.initFromOnnx(node, initWith, attributesForNode, graph); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/custom/CumProd.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/custom/CumProd.java index d1d0176ef..9c04aeb12 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/custom/CumProd.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/custom/CumProd.java @@ -17,7 +17,7 @@ package org.nd4j.linalg.api.ops.impl.transforms.custom; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -132,7 +132,7 @@ public class CumProd extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { super.initFromOnnx(node, initWith, attributesForNode, graph); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/custom/CumSum.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/custom/CumSum.java index 2b62b73cf..b8c7d5c51 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/custom/CumSum.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/custom/CumSum.java @@ -17,7 +17,7 @@ package org.nd4j.linalg.api.ops.impl.transforms.custom; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; @@ -133,7 +133,7 @@ public class CumSum extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { super.initFromOnnx(node, initWith, attributesForNode, graph); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/custom/Fill.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/custom/Fill.java index db95ee728..af4097870 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/custom/Fill.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/custom/Fill.java @@ -17,7 +17,7 @@ package org.nd4j.linalg.api.ops.impl.transforms.custom; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; @@ -80,7 +80,7 @@ public class Fill extends DynamicCustomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { super.initFromOnnx(node, initWith, attributesForNode, graph); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/strict/RectifiedTanh.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/strict/RectifiedTanh.java index 4bd56ea4d..da439cec7 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/strict/RectifiedTanh.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/strict/RectifiedTanh.java @@ -16,7 +16,7 @@ package org.nd4j.linalg.api.ops.impl.transforms.strict; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.functions.DifferentialFunction; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; @@ -81,7 +81,7 @@ public class RectifiedTanh extends BaseTransformStrictOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { super.initFromOnnx(node, initWith, attributesForNode, graph); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/random/impl/DropOutInverted.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/random/impl/DropOutInverted.java index bb4b86f12..6b174ae63 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/random/impl/DropOutInverted.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/random/impl/DropOutInverted.java @@ -17,7 +17,7 @@ package org.nd4j.linalg.api.ops.random.impl; import lombok.NonNull; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.linalg.api.ndarray.INDArray; @@ -75,7 +75,7 @@ public class DropOutInverted extends BaseRandomOp { } @Override - public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map attributesForNode, OnnxProto3.GraphProto graph) { + public void initFromOnnx(Onnx.NodeProto node, SameDiff initWith, Map attributesForNode, Onnx.GraphProto graph) { super.initFromOnnx(node, initWith, attributesForNode, graph); } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/random/impl/Range.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/random/impl/Range.java index 27e9d9f3c..c3670b52f 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/random/impl/Range.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/random/impl/Range.java @@ -17,7 +17,7 @@ package org.nd4j.linalg.api.ops.random.impl; import lombok.val; -import onnx.OnnxProto3; +import onnx.Onnx; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/protobuf/onnx/onnx-ml.proto3 b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/protobuf/onnx/onnx-ml.proto similarity index 100% rename from nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/protobuf/onnx/onnx-ml.proto3 rename to nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/protobuf/onnx/onnx-ml.proto diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/protobuf/onnx/onnx-operators.proto3 b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/protobuf/onnx/onnx-operators.proto similarity index 99% rename from nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/protobuf/onnx/onnx-operators.proto3 rename to nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/protobuf/onnx/onnx-operators.proto index a8db3ca23..48890a516 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/protobuf/onnx/onnx-operators.proto3 +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/protobuf/onnx/onnx-operators.proto @@ -9,7 +9,7 @@ syntax = "proto3"; package onnx; -import "onnx.proto3"; +import "onnx.proto"; // // This file contains the proto definitions for OperatorSetProto and diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/protobuf/onnx/onnx.proto3 b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/protobuf/onnx/onnx.proto similarity index 100% rename from nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/protobuf/onnx/onnx.proto3 rename to nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/protobuf/onnx/onnx.proto diff --git a/nd4j/nd4j-backends/nd4j-tests-tensorflow/src/test/cpujava/org/nd4j/tensorflow/conversion/GraphRunnerTest.java b/nd4j/nd4j-backends/nd4j-tests-tensorflow/src/test/cpujava/org/nd4j/tensorflow/conversion/GraphRunnerTest.java index af1af3a75..ee188605d 100644 --- a/nd4j/nd4j-backends/nd4j-tests-tensorflow/src/test/cpujava/org/nd4j/tensorflow/conversion/GraphRunnerTest.java +++ b/nd4j/nd4j-backends/nd4j-tests-tensorflow/src/test/cpujava/org/nd4j/tensorflow/conversion/GraphRunnerTest.java @@ -16,7 +16,7 @@ package org.nd4j.tensorflow.conversion; -import com.github.os72.protobuf351.util.JsonFormat; +import org.nd4j.shade.protobuf.util.JsonFormat; import org.apache.commons.io.IOUtils; import org.junit.Ignore; import org.junit.Rule; diff --git a/nd4j/nd4j-backends/nd4j-tests-tensorflow/src/test/gpujava/org/nd4j/tensorflow/conversion/GpuGraphRunnerTest.java b/nd4j/nd4j-backends/nd4j-tests-tensorflow/src/test/gpujava/org/nd4j/tensorflow/conversion/GpuGraphRunnerTest.java index accde5b1b..1ecc0e39a 100644 --- a/nd4j/nd4j-backends/nd4j-tests-tensorflow/src/test/gpujava/org/nd4j/tensorflow/conversion/GpuGraphRunnerTest.java +++ b/nd4j/nd4j-backends/nd4j-tests-tensorflow/src/test/gpujava/org/nd4j/tensorflow/conversion/GpuGraphRunnerTest.java @@ -16,7 +16,7 @@ package org.nd4j.tensorflow.conversion; -import com.github.os72.protobuf351.util.JsonFormat; +import org.nd4j.shade.protobuf.util.JsonFormat; import org.apache.commons.io.IOUtils; import org.junit.Ignore; import org.junit.Test; diff --git a/nd4j/nd4j-shade/pom.xml b/nd4j/nd4j-shade/pom.xml index 4a2c4ca1b..36b58087b 100644 --- a/nd4j/nd4j-shade/pom.xml +++ b/nd4j/nd4j-shade/pom.xml @@ -29,6 +29,7 @@ pom jackson + protobuf diff --git a/nd4j/nd4j-shade/protobuf/pom.xml b/nd4j/nd4j-shade/protobuf/pom.xml new file mode 100644 index 000000000..1cbd7d5a8 --- /dev/null +++ b/nd4j/nd4j-shade/protobuf/pom.xml @@ -0,0 +1,228 @@ + + + + nd4j-shade + org.nd4j + 1.0.0-SNAPSHOT + + 4.0.0 + + protobuf + + + true + + + + + com.google.protobuf + protobuf-java + 3.8.0 + + + com.google.protobuf + protobuf-java-util + 3.8.0 + + + + + + + custom-lifecycle + + + !skip.custom.lifecycle + + + + + + org.apache.portals.jetspeed-2 + jetspeed-mvn-maven-plugin + 2.3.1 + + + compile-and-pack + compile + + mvn + + + + + + org.apache.maven.shared + maven-invoker + 2.2 + + + + + + + create-shaded-jars + @rootdir@/nd4j/nd4j-shade/protobuf/ + clean,compile,package + + true + + + + + create-shaded-jars + + + + + + + + + + + + + + com.lewisd + lint-maven-plugin + 0.0.11 + + + pom-lint + none + + + + + + + + org.apache.maven.plugins + maven-shade-plugin + ${maven-shade-plugin.version} + + + package + + shade + + + + + reference.conf + + + + + + + + + + + + false + true + true + + + + com.google.protobuf:* + com.google.protobuf.*:* + + + + + + + com.google.protobuf + org.nd4j.shade.protobuf + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + true + + + + empty-javadoc-jar + package + + jar + + + javadoc + ${basedir}/javadoc + + + + empty-sources-jar + package + + jar + + + sources + ${basedir}/src + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.0.0 + + + unpack + package + + unpack + + + + + org.nd4j + protobuf + ${project.version} + jar + false + ${project.build.directory}/classes/ + **/*.class,**/*.xml + + + + + + + + + + \ No newline at end of file diff --git a/nd4j/nd4j-tensorflow/src/main/java/org/nd4j/tensorflow/conversion/TensorflowConversion.java b/nd4j/nd4j-tensorflow/src/main/java/org/nd4j/tensorflow/conversion/TensorflowConversion.java index b47cd30d1..6eff18ecc 100644 --- a/nd4j/nd4j-tensorflow/src/main/java/org/nd4j/tensorflow/conversion/TensorflowConversion.java +++ b/nd4j/nd4j-tensorflow/src/main/java/org/nd4j/tensorflow/conversion/TensorflowConversion.java @@ -16,7 +16,7 @@ package org.nd4j.tensorflow.conversion; -import com.github.os72.protobuf351.InvalidProtocolBufferException; +import org.nd4j.shade.protobuf.InvalidProtocolBufferException; import org.bytedeco.javacpp.*; import org.bytedeco.javacpp.indexer.*; import org.nd4j.linalg.api.buffer.DataBuffer; diff --git a/nd4j/nd4j-tensorflow/src/main/java/org/nd4j/tensorflow/conversion/graphrunner/GraphRunner.java b/nd4j/nd4j-tensorflow/src/main/java/org/nd4j/tensorflow/conversion/graphrunner/GraphRunner.java index 633535197..79d45f781 100644 --- a/nd4j/nd4j-tensorflow/src/main/java/org/nd4j/tensorflow/conversion/graphrunner/GraphRunner.java +++ b/nd4j/nd4j-tensorflow/src/main/java/org/nd4j/tensorflow/conversion/graphrunner/GraphRunner.java @@ -16,9 +16,9 @@ package org.nd4j.tensorflow.conversion.graphrunner; -import com.github.os72.protobuf351.ByteString; -import com.github.os72.protobuf351.InvalidProtocolBufferException; -import com.github.os72.protobuf351.util.JsonFormat; +import org.nd4j.shade.protobuf.ByteString; +import org.nd4j.shade.protobuf.InvalidProtocolBufferException; +import org.nd4j.shade.protobuf.util.JsonFormat; import lombok.Getter; import lombok.Setter; import lombok.extern.slf4j.Slf4j; @@ -638,7 +638,7 @@ public class GraphRunner implements Closeable { /** * Convert a json string written out - * by {@link com.github.os72.protobuf351.util.JsonFormat} + * by {@link org.nd4j.shade.protobuf.util.JsonFormat} * to a {@link org.bytedeco.tensorflow.ConfigProto} * @param json the json to read * @return the config proto to use