Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
RapidASR
Commits
fcb8c2d1
Commit
fcb8c2d1
authored
Feb 28, 2023
by
mayong
Browse files
update files.
parent
4521711f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
10 deletions
+0
-10
cpp_onnx/src/paraformer_onnx.cpp
cpp_onnx/src/paraformer_onnx.cpp
+0
-10
No files found.
cpp_onnx/src/paraformer_onnx.cpp
View file @
fcb8c2d1
...
@@ -145,22 +145,12 @@ string ModelImp::forward(float* din, int len, int flag)
...
@@ -145,22 +145,12 @@ string ModelImp::forward(float* din, int len, int flag)
try
{
try
{
auto
outputTensor
=
m_session
->
Run
(
run_option
,
m_szInputNames
.
data
(),
input_onnx
.
data
(),
m_szInputNames
.
size
(),
m_szOutputNames
.
data
(),
m_szOutputNames
.
size
());
auto
outputTensor
=
m_session
->
Run
(
run_option
,
m_szInputNames
.
data
(),
input_onnx
.
data
(),
m_szInputNames
.
size
(),
m_szOutputNames
.
data
(),
m_szOutputNames
.
size
());
<<<<<<<
.
mine
=======
>>>>>>>
.
theirs
std
::
vector
<
int64_t
>
outputShape
=
outputTensor
[
0
].
GetTensorTypeAndShapeInfo
().
GetShape
();
std
::
vector
<
int64_t
>
outputShape
=
outputTensor
[
0
].
GetTensorTypeAndShapeInfo
().
GetShape
();
int64_t
outputCount
=
std
::
accumulate
(
outputShape
.
begin
(),
outputShape
.
end
(),
1
,
std
::
multiplies
<
int64_t
>
());
int64_t
outputCount
=
std
::
accumulate
(
outputShape
.
begin
(),
outputShape
.
end
(),
1
,
std
::
multiplies
<
int64_t
>
());
float
*
floatData
=
outputTensor
[
0
].
GetTensorMutableData
<
float
>
();
float
*
floatData
=
outputTensor
[
0
].
GetTensorMutableData
<
float
>
();
auto
encoder_out_lens
=
outputTensor
[
1
].
GetTensorMutableData
<
int64_t
>
();
auto
encoder_out_lens
=
outputTensor
[
1
].
GetTensorMutableData
<
int64_t
>
();
<<<<<<<
.
mine
=======
>>>>>>>
.
theirs
result
=
greedy_search
(
floatData
,
*
encoder_out_lens
);
result
=
greedy_search
(
floatData
,
*
encoder_out_lens
);
}
}
catch
(...)
catch
(...)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment