Skip to content

Commit

Permalink
Pytorch message updates (#1344)
Browse files Browse the repository at this point in the history
* Update pytorch-model.md

* Update error.rs
  • Loading branch information
antimora committed Feb 22, 2024
1 parent b256c04 commit d6e8593
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion burn-book/src/import/pytorch-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ Which produces the following weights structure (viewed in

You can use the `PyTorchFileRecorder` to change the attribute names and the order of the attributes
by specifying a regular expression (See
[regex::Regex::replace](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace)) to
[regex::Regex::replace](https://docs.rs/regex/latest/regex/struct.Regex.html#method.replace) and
[try it online](https://rregex.dev/?version=1.10&method=replace)) to
match the attribute name and a replacement string in `LoadArgs`:

```rust
Expand Down
2 changes: 1 addition & 1 deletion crates/burn-core/src/record/serde/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::record::RecorderError;
#[derive(thiserror::Error, Debug)]
pub enum Error {
/// Failed to deserialize.
#[error("failed to deserialize")]
#[error("failed to deserialize: {0}")]
Deserialize(#[from] serde::de::value::Error),

/// Failed to serialize.
Expand Down

0 comments on commit d6e8593

Please sign in to comment.