Skip to content

Commit

Permalink
conv1d - clean up comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrist1 committed Jul 15, 2023
1 parent 019dbbf commit 7bc71fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
8 changes: 1 addition & 7 deletions src/nn/conv1d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,10 @@ where
}
}

/// **Requires Nightly** Performs *unbiased* 2d convolutions on 3d and 4d images.
/// **Requires Nightly** Performs *unbiased* 1d convolutions on 2d and 3d images.
///
/// **Pytorch Equivalent**: `torch.nn.Conv1d(..., bias=False)`
///
/// To create a biased conv, combine with [crate::nn::modules::Bias2D]:
/// ```ignore
/// # use dfdx::prelude::*;
/// type BiasedConv = (Conv1D<3, 5, 4>, Bias2D<5>);
/// ```
///
/// Generics:
/// - `IN_CHAN`: The number of input channels in an image.
/// - `OUT_CHAN`: The number of channels in the output of the layer.
Expand Down
6 changes: 3 additions & 3 deletions src/tensor_ops/conv1d/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub(super) trait Conv1DKernel<E: Dtype>: Storage<E> {
) -> Result<(), Self::Err>;
}

/// Apply the 1d convolution to a tensor.
/// Applies a 1d convolution to a tensor.
///
/// [Const] dims **require nightly**:
/// ```ignore
Expand Down Expand Up @@ -91,7 +91,7 @@ pub trait TryConv1D<Stride, Padding, Dilation, Groups>: Sized {
type Convolved;
type Error: std::fmt::Debug;

/// Applies a 2D convolution to the input tensor.
/// Applies a 1D convolution to the input tensor.
fn conv1d(
self,
stride: Stride,
Expand All @@ -102,7 +102,7 @@ pub trait TryConv1D<Stride, Padding, Dilation, Groups>: Sized {
self.try_conv1d(stride, padding, dilation, groups).unwrap()
}

/// Fallibly applies a 2D convolution to the input tensor.
/// Fallibly applies a 1D convolution to the input tensor.
fn try_conv1d(
self,
stride: Stride,
Expand Down

0 comments on commit 7bc71fb

Please sign in to comment.