Skip to content

Commit

Permalink
Remove delta_t, as it duplicates existing data
Browse files Browse the repository at this point in the history
  • Loading branch information
dae committed Aug 21, 2023
1 parent 3e8c515 commit a9e1fd5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion src/convertor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ fn convert_to_fsrs_item(
let last = entries.last().unwrap();
Some(FSRSItem {
reviews,
delta_t: last.delta_t as f32,
label: match last.button_chosen {
1 => 0.0,
2 | 3 | 4 | _ => 1.0,
Expand Down
3 changes: 1 addition & 2 deletions src/dataset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use crate::convertor::anki_to_fsrs;
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct FSRSItem {
pub reviews: Vec<FSRSReview>,
pub delta_t: f32,
pub label: f32,
}

Expand Down Expand Up @@ -70,7 +69,7 @@ impl<B: Backend> Batcher<FSRSItem, FSRSBatch<B>> for FSRSBatcher<B> {

let delta_ts = items
.iter()
.map(|item| Tensor::<B, 1, Float>::from_data(Data::from([item.delta_t.elem()])))
.map(|item| Tensor::<B, 1, Float>::from_data(Data::from([item.reviews.last().unwrap().delta_t.elem()])))
.collect();

let labels = items
Expand Down

0 comments on commit a9e1fd5

Please sign in to comment.