File tree Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,6 @@ class ORTModelBackend(onnxBytes: Array[Byte])
93
93
session,
94
94
inputTensors,
95
95
allNodeNamesAndDims._1,
96
- allNodeNamesAndDims._2,
97
96
allNodeNamesAndDims._3
98
97
)
99
98
// val outputPointer = out.get(0).GetTensorMutableDataFloat().capacity(inputs.GetTensorTypeAndShapeInfo().GetElementCount());
Original file line number Diff line number Diff line change @@ -31,8 +31,7 @@ trait ORTOperatorBackend extends OpToONNXBytesConverter with AutoCloseable {
31
31
def runModel (
32
32
sess : Session ,
33
33
input_tensor_values : Array [Value ],
34
- inputNames : PointerPointer [BytePointer ],
35
- nodeDims : Array [LongPointer ],
34
+ inputNames : PointerPointer [BytePointer ],
36
35
outputNames : PointerPointer [BytePointer ]
37
36
) = {
38
37
@@ -393,8 +392,8 @@ trait ORTOperatorBackend extends OpToONNXBytesConverter with AutoCloseable {
393
392
inputs._9.asInstanceOf [Option [Tensor [_]]]
394
393
).flatten
395
394
396
- val inputDimsAndValues : Array [Tuple2 [ LongPointer , Value ] ] =
397
- inputArr.map(x => ( new LongPointer (), getTensor(x) ))
395
+ val inputDimsAndValues : Array [Value ] =
396
+ inputArr.map(x => getTensor(x))
398
397
399
398
/*
400
399
(0 until 9).map{i =>
@@ -414,9 +413,8 @@ trait ORTOperatorBackend extends OpToONNXBytesConverter with AutoCloseable {
414
413
// println(tens._2(0))
415
414
val output = runModel(
416
415
sess,
417
- inputDimsAndValues.map(_._2) ,
416
+ inputDimsAndValues,
418
417
input_node_names,
419
- inputDimsAndValues.map(_._1),
420
418
output_node_names
421
419
)
422
420
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import org.bytedeco.javacpp.BytePointer
12
12
13
13
trait OpToONNXBytesConverter extends AutoCloseable {
14
14
15
- private val scope = new PointerScope ()
15
+ // private val scope = new PointerScope()
16
16
17
17
protected def opToNode [
18
18
T : ClassTag ,
@@ -35,7 +35,7 @@ trait OpToONNXBytesConverter extends AutoCloseable {
35
35
// implicit evT: (UNil TypeOr Float16 TypeOr Float TypeOr Double TypeOr UByte TypeOr UShort TypeOr UInt TypeOr ULong TypeOr Byte TypeOr Short TypeOr Int TypeOr Long TypeOr Float16 TypeOr Float TypeOr Double TypeOr String TypeOr Boolean TypeOr Complex[
36
36
// Float] TypeOr Complex[Double])#check[T])
37
37
: NodeProto = {
38
- val node = ( new NodeProto ). New ()
38
+ val node = new NodeProto
39
39
40
40
node.set_name(name)
41
41
node.set_op_type(opName)
@@ -256,7 +256,7 @@ trait OpToONNXBytesConverter extends AutoCloseable {
256
256
}
257
257
258
258
override def close (): Unit = {
259
- scope.close
259
+ // scope.close
260
260
}
261
261
262
262
}
You can’t perform that action at this time.
0 commit comments