aboutsummaryrefslogtreecommitdiffstats
path: root/look2hear/utils/inversible_interface.py
diff options
context:
space:
mode:
authorKai Li (李凯) <tsinghua.kaili@gmail.com>2024-09-07 01:23:39 +0800
committerKai Li (李凯) <tsinghua.kaili@gmail.com>2024-09-07 01:23:39 +0800
commitd72b12cf8b5d9b80acdbe8082f0451389afc6407 (patch)
tree4f8f0554de3e4513fee7afa0cd2707338fe99011 /look2hear/utils/inversible_interface.py
downloadapollo-gfx803-d72b12cf8b5d9b80acdbe8082f0451389afc6407.tar.gz
First Commit
Diffstat (limited to 'look2hear/utils/inversible_interface.py')
-rw-r--r--look2hear/utils/inversible_interface.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/look2hear/utils/inversible_interface.py b/look2hear/utils/inversible_interface.py
new file mode 100644
index 0000000..919107e
--- /dev/null
+++ b/look2hear/utils/inversible_interface.py
@@ -0,0 +1,13 @@
+from abc import ABC, abstractmethod
+from typing import Tuple
+
+import torch
+
+
+class InversibleInterface(ABC):
+ @abstractmethod
+ def inverse(
+ self, input: torch.Tensor, input_lengths: torch.Tensor = None
+ ) -> Tuple[torch.Tensor, torch.Tensor]:
+ # return output, output_lengths
+ raise NotImplementedError \ No newline at end of file