mirror of
https://github.com/tracel-ai/burn.git
synced 2026-05-31 19:49:48 +09:00
fix(doc): inconsistent assertion for non-negative (#5016)
This commit is contained in:
@@ -109,7 +109,7 @@ impl SizeConfig {
|
||||
match self {
|
||||
SizeConfig::Default => source_size,
|
||||
SizeConfig::Ratio(ratio) => {
|
||||
assert!(ratio >= 0.0, "Ratio must be positive: {ratio}");
|
||||
assert!(ratio >= 0.0, "Ratio must be non-negative: {ratio}");
|
||||
((source_size as f64) * ratio) as usize
|
||||
}
|
||||
SizeConfig::Fixed(size) => size,
|
||||
|
||||
Reference in New Issue
Block a user