Fix model initialization bugs

This commit is contained in:
Gadersd
2023-08-05 16:20:49 -04:00
parent 10ce5ac89d
commit ce91c8838f
4 changed files with 2 additions and 4 deletions

View File

@@ -348,6 +348,7 @@ pub struct PaddedConv2d<B: Backend> {
impl<B: Backend> PaddedConv2d<B> {
fn forward(&self, x: Tensor<B, 4>) -> Tensor<B, 4> {
println!("{} {} {:?} {:?}", self.kernel_size, self.stride, self.padding, self.padding_actual);
let [n_batch, n_channel, height, width] = x.dims();
let desired_height = (self.padding.pad_top + self.padding.pad_bottom + height - self.kernel_size) / self.stride + 1;