Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convolutions #22

Merged
merged 76 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
f220c47
add first convolution test
hunterboerner Dec 7, 2024
e30062b
stub implementation
hunterboerner Dec 7, 2024
c4de7cb
add assert_all_close helper
hunterboerner Dec 7, 2024
b8599f5
Attempt at implementing convolve
hunterboerner Dec 7, 2024
597d2ce
Add another test
hunterboerner Dec 7, 2024
b32169c
remove nil
hunterboerner Dec 7, 2024
db61498
try changing order
hunterboerner Dec 8, 2024
4388184
shape to output
hunterboerner Dec 8, 2024
8de0a00
change reversing
hunterboerner Dec 9, 2024
67ae6f3
full mode
hunterboerner Dec 9, 2024
c0cf107
proper reshaping
hunterboerner Dec 9, 2024
c317373
Add another test
hunterboerner Dec 9, 2024
8ab92ab
Complex test
hunterboerner Dec 9, 2024
219de78
Zero rank
hunterboerner Dec 9, 2024
60864fa
Add a numpy test
hunterboerner Dec 9, 2024
e5e1856
fairly unnecessary unwrite test
hunterboerner Dec 9, 2024
d4028c6
Add comment for where tests came from
hunterboerner Dec 9, 2024
e502373
Add auto mode
hunterboerner Dec 9, 2024
61cf708
Start implementing fftconvolve
hunterboerner Dec 9, 2024
5cef02b
refactor: simplify reshapes and fix paddings
polvalente Dec 9, 2024
12ac3c7
Merge branch 'convolutions' of github.com:hunterboerner/nx_signal int…
polvalente Dec 9, 2024
de67b3a
No auto method
hunterboerner Dec 10, 2024
1d849ff
We have FFT support but the tensors are not ordered correctly
hunterboerner Dec 10, 2024
1119e14
Change ignore to explicit axes
hunterboerner Dec 10, 2024
fade865
Try getting FFTConvolve working
hunterboerner Dec 10, 2024
13fb3b6
Fix typo
hunterboerner Dec 10, 2024
6c18faa
Fix the operator (again)
hunterboerner Dec 10, 2024
bfeec5a
checkpoint
hunterboerner Dec 10, 2024
45bc1da
fft_nd not working correctly
hunterboerner Dec 10, 2024
c060f82
value should be negative
hunterboerner Dec 10, 2024
1066fa2
Add test for fft_nd with padding
hunterboerner Dec 10, 2024
ebc61f4
test: explicit assertions
polvalente Dec 10, 2024
23b205e
refactor: split code paths
polvalente Dec 10, 2024
13e70cc
fix: broadcasting rules
polvalente Dec 10, 2024
69dcf20
More tests for convolution
hunterboerner Dec 10, 2024
9226016
New (broken) test
hunterboerner Dec 10, 2024
6c2fc54
Get tests passing modulo valid
hunterboerner Dec 10, 2024
16dcb5a
Invalid arg tests
hunterboerner Dec 10, 2024
41286c4
Try implementing "valid" convolution
hunterboerner Dec 10, 2024
d8dc84e
Swap kernel and volume for valid mode
hunterboerner Dec 10, 2024
4875ae8
More convolution tests
hunterboerner Dec 11, 2024
afe2c97
Don't upcast to complex numbers test
hunterboerner Dec 11, 2024
5d9620b
mismatched dims tests
hunterboerner Dec 11, 2024
51f23aa
2d test
hunterboerner Dec 11, 2024
d1aef2b
More FFT convolution tests
hunterboerner Dec 11, 2024
9ef7165
More FFT convolvution tests
hunterboerner Dec 17, 2024
ae7b05a
FFT same mode
hunterboerner Dec 17, 2024
77f815b
Valid mode for FFT
hunterboerner Dec 17, 2024
70ba95b
add brief doc
hunterboerner Dec 17, 2024
22fa94c
First correlation tests and implementation
hunterboerner Dec 17, 2024
6e0cc30
Rank 1 same correlation test
hunterboerner Dec 17, 2024
b6de107
Rank 1 full correlation test
hunterboerner Dec 17, 2024
bba9819
Complex correlation
hunterboerner Dec 17, 2024
1e74d60
fix: allow doc metadata to not be set
polvalente Dec 17, 2024
a9d0b32
Implement test for oaconvolve
hunterboerner Dec 18, 2024
ae4b85e
Revert "Implement test for oaconvolve"
hunterboerner Dec 18, 2024
53bca88
refactor: overall improvements
polvalente Dec 20, 2024
b9f0c95
Docs. Latex not rendering correctly
hunterboerner Dec 21, 2024
45fc931
Fix LaTeX
hunterboerner Dec 21, 2024
465afde
Correlation docs
hunterboerner Dec 21, 2024
c133d41
Doctests for convolution and correlation
hunterboerner Dec 21, 2024
4596b30
Update lib/nx_signal/convolution.ex
hunterboerner Dec 22, 2024
bfbb807
Update lib/nx_signal/convolution.ex
hunterboerner Dec 22, 2024
910c4ba
Update lib/nx_signal/convolution.ex
hunterboerner Dec 22, 2024
09a6817
Update lib/nx_signal/convolution.ex
hunterboerner Dec 22, 2024
3592ecd
Don't upcast to complex for correlate
hunterboerner Dec 23, 2024
f58f9bb
Add tests for fft_nd and ifft_nd
hunterboerner Dec 23, 2024
c68a413
docs: document fftconvolve
polvalente Dec 23, 2024
363e13a
docs: improve docs for fftconvolve
polvalente Dec 23, 2024
33a4372
docs: more doc improvemnets
polvalente Dec 23, 2024
c074683
docs: improve docs
polvalente Dec 23, 2024
2ed0736
chore: remove helpers module
polvalente Dec 23, 2024
03eea5a
chore: remove imports
polvalente Dec 24, 2024
0135211
chore: update ci
polvalente Dec 24, 2024
b4c4c87
fix: use runner os in cache key
polvalente Dec 24, 2024
12c3505
fix: hash suffix
polvalente Dec 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
strategy:
fail-fast: false
matrix:
elixir: ["1.14.0"]
otp: ["24.0"]
elixir: ["1.18.0"]
otp: ["27.0"]
env:
MIX_ENV: test
steps:
Expand All @@ -22,11 +22,11 @@ jobs:
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}
- name: Retrieve dependencies cache
uses: actions/cache@v1
uses: actions/cache@v4
id: mix-cache # id to use in retrieve action
with:
path: deps
key: v1-${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
key: v1-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles('mix.lock') }}
- name: Install dependencies
if: ${{ steps.mix-cache.outputs.cache-hit != 'true' }}
run: mix deps.get
Expand All @@ -42,8 +42,8 @@ jobs:
strategy:
fail-fast: false
matrix:
elixir: ["1.14.0"]
otp: ["24.0"]
elixir: ["1.18.0"]
otp: ["27.0"]
env:
MIX_ENV: test
steps:
Expand All @@ -57,11 +57,11 @@ jobs:
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}
- name: Retrieve dependencies cache
uses: actions/cache@v1
uses: actions/cache@v4
id: mix-cache # id to use in retrieve action
with:
path: deps
key: v1-${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
key: v1-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles('mix.lock') }}
- name: Install dependencies
if: ${{ steps.mix-cache.outputs.cache-hit != 'true' }}
run: mix deps.get
Expand Down
3 changes: 1 addition & 2 deletions lib/nx_signal.ex
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,6 @@ defmodule NxSignal do

in_shape
|> Tuple.delete_at(idx)
|> Tuple.delete_at(idx)
|> Tuple.append(out_len)
|> put_elem(idx, out_len)
end
end
Loading
Loading