mirror of
https://github.com/macaodha/batdetect2.git
synced 2025-06-29 14:41:58 +02:00
16 lines
382 B
Python
16 lines
382 B
Python
import sys
|
|
from typing import Iterable, List, Literal, Sequence
|
|
|
|
import torch
|
|
from torch import nn
|
|
|
|
from batdetect2.models.blocks import ConvBlockDownCoordF, ConvBlockDownStandard
|
|
|
|
if sys.version_info >= (3, 10):
|
|
from itertools import pairwise
|
|
else:
|
|
|
|
def pairwise(iterable: Sequence) -> Iterable:
|
|
for x, y in zip(iterable[:-1], iterable[1:]):
|
|
yield x, y
|