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

ENH: Pad transect during inference #277

Merged
merged 3 commits into from
Nov 7, 2022
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
MNT: Pad segments before applying model for inference
  • Loading branch information
scottclowe committed Jan 29, 2022
commit 0ab10288fc69738c401200d78a7d5d390b9f4b82
3 changes: 2 additions & 1 deletion echofilter/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from echofilter.nn.wrapper import Echofilter
import echofilter.path
import echofilter.raw
from echofilter.raw.manipulate import join_transect, split_transect
from echofilter.raw.manipulate import join_transect, pad_transect, split_transect
from echofilter.raw.utils import fillholes2d
import echofilter.ui
import echofilter.ui.checkpoints
Expand Down Expand Up @@ -1297,6 +1297,7 @@ def inference_transect(
]
)
segment = transform(segment)
segment = pad_transect(segment)
input = torch.tensor(segment["signals"]).unsqueeze(0).unsqueeze(0)
input = input.to(device, dtype).contiguous()
# Put data through model
Expand Down