Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
olegdayo committed May 20, 2023
1 parent 6731586 commit 31c0d7b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/macos-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ jobs:
- name: Setup Environment
run: ./scripts/setup.sh

- name: LTPT
run: export LIBTORCH_USE_PYTORCH=1

- name: Test
run: cargo test --verbose --verbose
working-directory: src-tauri
2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ simple_logger = "4.0"

rand = "0.8"

tch = "0.13"
tch = "0.10"
image = "0.24"

cpal = "0.15"
Expand Down
6 changes: 3 additions & 3 deletions src-tauri/src/mascot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ pub struct Mascot {
///
/// It takes original 3-channel tensor and makes 1-channel tensor with mean vallues.
pub fn to_bw(tensor: Tensor) -> Tensor {
(tensor.index(&[Some(Tensor::from_slice(&[0i64])), None, None])
+ tensor.index(&[Some(Tensor::from_slice(&[1i64])), None, None])
+ tensor.index(&[Some(Tensor::from_slice(&[2i64])), None, None]))
(tensor.index(&[Some(Tensor::of_slice(&[0i64])), None, None])
+ tensor.index(&[Some(Tensor::of_slice(&[1i64])), None, None])
+ tensor.index(&[Some(Tensor::of_slice(&[2i64])), None, None]))
/ 3f64
}

Expand Down

0 comments on commit 31c0d7b

Please sign in to comment.