mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 10:38:54 +00:00
Add more of the conv1d op.
This commit is contained in:
@ -236,8 +236,7 @@ impl Conv1D {
|
||||
fn forward(&self, x: &Tensor) -> candle::Result<Tensor> {
|
||||
let (bsize, _, _) = x.shape().r3()?;
|
||||
let w = self.weight.broadcast_left(bsize)?.t()?;
|
||||
// TODO: Add the conv1d operation
|
||||
let x = x.matmul(&w)?;
|
||||
let x = x.conv1d(&w, self.config.padding, self.config.stride)?;
|
||||
match &self.bias {
|
||||
None => Ok(x),
|
||||
Some(bias) => x.broadcast_add(bias),
|
||||
|
Reference in New Issue
Block a user