@@ -123,7 +123,7 @@ package object onnx {
123
123
keepdims : KeepDims = true ,
124
124
data : Tensor [T , Tuple3 [Tt , Td , S ]]
125
125
)(using tt : ValueOf [Tt1 ], td : TensorShapeDenotationOf [KeepOrReduceDimDenotations [Td ,Axis ,KeepDims ]], s : ShapeOf [KeepOrReduceDims [S ,Axis ,KeepDims ]], i : IndicesOf [Axis ], k : ValueOf [KeepDims ]): Tensor [Long , Tuple3 [Tt1 , KeepOrReduceDimDenotations [Td ,Axis ,KeepDims ], KeepOrReduceDims [S ,Axis ,KeepDims ]]] = {
126
- val map : Map [String , Any ] = Map (" axis" -> indicesOf[Axis ].indices.toArray, " keepdims" -> (if (valueOf[KeepDims ]) 1 else 0 ))
126
+ val map : Map [String , Any ] = Map (" axis" -> indicesOf[Axis ].indices.toArray.head , " keepdims" -> (if (valueOf[KeepDims ]) 1 else 0 ))
127
127
val allInputs = Tuple1 (data)
128
128
(callOp(name, " ArgMax" , allInputs, map))
129
129
}
@@ -1217,7 +1217,7 @@ package object onnxruntime {
1217
1217
selectLastIndex : Int = 0 ,
1218
1218
data : Tensor [T , Tuple3 [Tt , Td , S ]]
1219
1219
)(using tt : ValueOf [Tt1 ], td : TensorShapeDenotationOf [KeepOrReduceDimDenotations [Td ,Axis ,KeepDims ]], s : ShapeOf [KeepOrReduceDims [S ,Axis ,KeepDims ]], i : IndicesOf [Axis ], k : ValueOf [KeepDims ]): Tensor [Long , Tuple3 [Tt1 , KeepOrReduceDimDenotations [Td ,Axis ,KeepDims ], KeepOrReduceDims [S ,Axis ,KeepDims ]]] = {
1220
- val map : Map [String , Any ] = Map (" axis" -> indicesOf[Axis ].indices.toArray, " select_last_index" -> selectLastIndex, " keepdims" -> (if (valueOf[KeepDims ]) 1 else 0 ))
1220
+ val map : Map [String , Any ] = Map (" axis" -> indicesOf[Axis ].indices.toArray.head , " select_last_index" -> selectLastIndex, " keepdims" -> (if (valueOf[KeepDims ]) 1 else 0 ))
1221
1221
val allInputs = Tuple1 (data)
1222
1222
(callOp(name, " ArgMax" , allInputs, map))
1223
1223
}
@@ -1234,7 +1234,7 @@ package object onnxruntime {
1234
1234
selectLastIndex : Int = 0 ,
1235
1235
data : Tensor [T , Tuple3 [Tt , Td , S ]]
1236
1236
)(using tt : ValueOf [Tt1 ], td : TensorShapeDenotationOf [KeepOrReduceDimDenotations [Td ,Axis ,KeepDims ]], s : ShapeOf [KeepOrReduceDims [S ,Axis ,KeepDims ]], i : IndicesOf [Axis ], k : ValueOf [KeepDims ]): Tensor [Long , Tuple3 [Tt1 , KeepOrReduceDimDenotations [Td ,Axis ,KeepDims ], KeepOrReduceDims [S ,Axis ,KeepDims ]]] = {
1237
- val map : Map [String , Any ] = Map (" axis" -> indicesOf[Axis ].indices.toArray, " select_last_index" -> selectLastIndex, " keepdims" -> (if (valueOf[KeepDims ]) 1 else 0 ))
1237
+ val map : Map [String , Any ] = Map (" axis" -> indicesOf[Axis ].indices.toArray.head , " select_last_index" -> selectLastIndex, " keepdims" -> (if (valueOf[KeepDims ]) 1 else 0 ))
1238
1238
val allInputs = Tuple1 (data)
1239
1239
(callOp(name, " ArgMin" , allInputs, map))
1240
1240
}
@@ -1249,7 +1249,7 @@ package object onnxruntime {
1249
1249
keepdims : KeepDims = true ,
1250
1250
data : Tensor [T , Tuple3 [Tt , Td , S ]]
1251
1251
)(using tt : ValueOf [Tt1 ], td : TensorShapeDenotationOf [KeepOrReduceDimDenotations [Td ,Axis ,KeepDims ]], s : ShapeOf [KeepOrReduceDims [S ,Axis ,KeepDims ]], i : IndicesOf [Axis ], k : ValueOf [KeepDims ]): Tensor [Long , Tuple3 [Tt1 , KeepOrReduceDimDenotations [Td ,Axis ,KeepDims ], KeepOrReduceDims [S ,Axis ,KeepDims ]]] = {
1252
- val map : Map [String , Any ] = Map (" axis" -> indicesOf[Axis ].indices.toArray, " keepdims" -> (if (valueOf[KeepDims ]) 1 else 0 ))
1252
+ val map : Map [String , Any ] = Map (" axis" -> indicesOf[Axis ].indices.toArray.head , " keepdims" -> (if (valueOf[KeepDims ]) 1 else 0 ))
1253
1253
val allInputs = Tuple1 (data)
1254
1254
(callOp(name, " ArgMin" , allInputs, map))
1255
1255
}
0 commit comments