question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

conv1d and conv2d should support further batching

See original GitHub issue

It looks like conv1d and conv2d expect only one dimension of batching (NxCxI to conv1d). In torch you can do additional dimensions of batching (N1xN2xCxI to conv1d), compare:

import torch
import torch.nn.functional as F
x = torch.zeros(3,1,4,4, dtype=torch.float32)
y = torch.zeros(3,1,4,4, dtype=torch.float64);
F.conv1d(x,y)

and

let x = dsharp.zeros([3;1;4;4])
let y = dsharp.zeros([3;1;4;4])
dsharp.conv1d(x,y)

gives

System.Exception: Expecting two 3d Tensors t1, t2 where t1 is input (NxCxI: batchSize x inputChannels x inputLength) and t2 is filters (KxCxF: outputChannels x inputChannels x kernelLength), received Tensors with shapes [|3; 1; 4; 4|], [|3; 1; 4; 4|]

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
moloneymbcommented, Apr 29, 2020

Supporting ‘further batching’ should be a byproduct of implementing a reshape operation. The reshape operation should not add significant overhead as it just changes the shape.

0reactions
gbaydincommented, Aug 19, 2021

Closing this. Please ping me if there is something I missed and we can reopen.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the difference between Conv1D and Conv2D?
Conv1D and Conv2D summarize (convolve) along one or two dimensions. For instance, you could convolve a vector into a shorter vector as followss....
Read more >
Conv1D and batch_size questions - keras
I face two problems when I implement 1D convnet for multi-channel sequential data. (224 samples x 300 time sequential x 19 channels).
Read more >
1D Convolutional Neural Network Models for Human ...
The model is fit for a fixed number of epochs, in this case 10, and a batch size of 32 samples will be...
Read more >
Conv1d or Conv2d for 1d vectors with batch size?
It took my batch size into account, if so, in the training section, if I need to change the batch size, then we...
Read more >
tf.keras.layers.Conv1D | TensorFlow v2.13.0
With extended batch shape [4, 7] (e.g. weather data where batch # dimensions correspond to spatial location and the third dimension # corresponds...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found