Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print module - implement module display for remaining modules (part2) #1933

Merged
merged 56 commits into from
Jun 28, 2024
Merged
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
32cd4c2
Display for ConvTranspose1d
antimora Jun 26, 2024
dab0d25
Display for ConvTranspose2d
antimora Jun 26, 2024
a342324
Test for batch norm display
antimora Jun 26, 2024
9e2fa95
Display for group norm
antimora Jun 26, 2024
1a6f303
Display for Instance norm
antimora Jun 26, 2024
1e73430
Test for layer display
antimora Jun 26, 2024
eea0821
Display for RMS
antimora Jun 26, 2024
a762ede
Fix conv transpose
antimora Jun 26, 2024
80cb068
Test for conv1d display
antimora Jun 26, 2024
359f7b0
Test for conv2d display
antimora Jun 26, 2024
d76fca7
Add display for BinaryCrossEntropyLoss
antimora Jun 26, 2024
5e5f4a3
Make attributes pub
antimora Jun 26, 2024
edf2945
Display for cross entropy
antimora Jun 26, 2024
7451557
Rename print to display in tests
antimora Jun 26, 2024
7da0e1f
Removed PhantomData
antimora Jun 26, 2024
d13b8bb
Added huber display
antimora Jun 26, 2024
4711f9a
Add display for MSE
antimora Jun 26, 2024
0e40d35
Merge remote-tracking branch 'upstream/main' into print-module-part2
antimora Jun 26, 2024
1a291a7
Update log message format
antimora Jun 26, 2024
a7bf1fc
Display for AdaptiveAvgPool1d
antimora Jun 26, 2024
d6c7db0
Display for AdaptiveAvgPool2d
antimora Jun 26, 2024
1c10e32
Make attributes pub for AvgPool1d
antimora Jun 26, 2024
f453b99
Display for AvgPool1d and AvgPool2d
antimora Jun 26, 2024
c4c3d96
Merge remote-tracking branch 'upstream/main' into print-module-part2
antimora Jun 26, 2024
1324471
Display for MaxPool1d and MaxPool2d
antimora Jun 26, 2024
7b736cb
Add display for Gru
antimora Jun 26, 2024
f38fc2e
Add display for lstm
antimora Jun 26, 2024
a7f3717
Add display test to dropout
antimora Jun 26, 2024
169d426
Make dropout attributes pub
antimora Jun 26, 2024
ade898e
Add display for Embedding
antimora Jun 26, 2024
9632ff4
Clean up
antimora Jun 26, 2024
de92657
Add linear display test
antimora Jun 26, 2024
cd38b99
Make attribute pub
antimora Jun 26, 2024
635b2cb
Clean up
antimora Jun 27, 2024
5d605c2
Add display test to gelu
antimora Jun 27, 2024
a2ab8dd
Add display to leaky relu
antimora Jun 27, 2024
84221ad
Add display to prelu
antimora Jun 27, 2024
213732c
Add test to relu
antimora Jun 27, 2024
c7b6df4
Merge remote-tracking branch 'upstream/main' into print-module-part2
antimora Jun 27, 2024
d7c488e
Fix prelu test
antimora Jun 27, 2024
bfcf067
Clean up
antimora Jun 27, 2024
81ad5f7
Add display for PositionalEncoding
antimora Jun 27, 2024
129e220
Add display for role encoding
antimora Jun 27, 2024
30f01f4
Add display for SwiGlu
antimora Jun 27, 2024
e29943a
Add display test for Tanh
antimora Jun 27, 2024
fd53c9a
Fix burn-import
antimora Jun 27, 2024
4ebc60c
Add display to unfold
antimora Jun 27, 2024
004fc39
Add display for pwff
antimora Jun 27, 2024
b50d3d2
Add display for Transformer decoder
antimora Jun 27, 2024
d2d6fec
Add display for encoder
antimora Jun 27, 2024
604129e
Add display for MultiHeadAttention
antimora Jun 27, 2024
957e239
Fix test
antimora Jun 27, 2024
4a437ce
Merge remote-tracking branch 'upstream/main' into print-module-part2
antimora Jun 28, 2024
fbd0e51
Make module attributes pub
antimora Jun 28, 2024
dd5be66
Add module display for BiLstm
antimora Jun 28, 2024
6045411
Clean up
antimora Jun 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add linear display test
  • Loading branch information
antimora committed Jun 26, 2024
commit de9265789b6477d06b93d46204b6082e0f0b4461
11 changes: 11 additions & 0 deletions crates/burn-core/src/nn/linear.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,15 @@ mod tests {

assert_eq!(result_1d.into_data(), result_2d.into_data());
}

#[test]
fn display() {
let config = LinearConfig::new(3, 5);
let linear = config.init::<TestBackend>(&Default::default());

assert_eq!(
alloc::format!("{}", linear),
"Linear {d_input: 3, d_output: 5, bias: true, params: 20}"
);
}
}