Skip to content

Commit

Permalink
Update to rten v0.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
robertknight committed Dec 28, 2024
1 parent 330b985 commit e1fb884
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
22 changes: 11 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ members = [
]

[workspace.dependencies]
rten = { version = "0.14.0" }
rten-imageproc = { version = "0.14.0" }
rten-tensor = { version = "0.14.0" }
rten = { version = "0.15.0" }
rten-imageproc = { version = "0.15.0" }
rten-tensor = { version = "0.15.0" }
10 changes: 6 additions & 4 deletions ocrs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,11 @@ mod tests {
Dimension::Fixed(200),
Dimension::Fixed(100),
]),
None,
);
gb.add_input(input_id);

let output_id = gb.add_value("output", None);
let output_id = gb.add_value("output", None, None);
gb.add_output(output_id);

let bias = Tensor::from_scalar(0.5);
Expand Down Expand Up @@ -353,11 +354,12 @@ mod tests {
Dimension::Fixed(output_columns),
Dimension::Symbolic("seq".to_string()),
]),
None,
);
gb.add_input(input_id);

// MaxPool to scale width by 1/4: NCHW => NCHW/4
let pool_out = gb.add_value("max_pool_out", None);
let pool_out = gb.add_value("max_pool_out", None, None);
gb.add_operator(
"max_pool",
OpType::MaxPool(MaxPool {
Expand All @@ -372,7 +374,7 @@ mod tests {
// Squeeze to remove the channel dim: NCHW/4 => NHW/4
let squeeze_axes = Tensor::from_vec(vec![1]);
let squeeze_axes_id = gb.add_constant(squeeze_axes.view());
let squeeze_out = gb.add_value("squeeze_out", None);
let squeeze_out = gb.add_value("squeeze_out", None, None);
gb.add_operator(
"squeeze",
OpType::Squeeze,
Expand All @@ -381,7 +383,7 @@ mod tests {
);

// Transpose: NHW/4 => W/4NH
let transpose_out = gb.add_value("transpose_out", None);
let transpose_out = gb.add_value("transpose_out", None, None);
gb.add_operator(
"transpose",
OpType::Transpose(Transpose {
Expand Down

0 comments on commit e1fb884

Please sign in to comment.