MCPcopy Create free account
hub / github.com/colaudiolab/BeamformNet / set_diff_method

Method set_diff_method

DeepSFNS/models/subspaceNet.py:254–273  ·  view source on GitHub ↗

Sets the differentiable subspace method for training subspaceNet. Options: "root_music", "esprit" Args: ----- diff_method (str): differentiable subspace method. Raises: ------- Exception: Method diff_method is not defined for Subs

(self, diff_method: str)

Source from the content-addressed store, hash-verified

252 self.set_diff_method(diff_method)
253
254 def set_diff_method(self, diff_method: str):
255 """Sets the differentiable subspace method for training subspaceNet.
256 Options: "root_music", "esprit"
257
258 Args:
259 -----
260 diff_method (str): differentiable subspace method.
261
262 Raises:
263 -------
264 Exception: Method diff_method is not defined for SubspaceNet
265 """
266 if diff_method.startswith("root_music"):
267 self.diff_method = root_music
268 elif diff_method.startswith("esprit"):
269 self.diff_method = esprit
270 else:
271 raise Exception(
272 f"SubspaceNet.set_diff_method: Method {diff_method} is not defined for SubspaceNet"
273 )
274
275 def anti_rectifier(self, X):
276 """Applies the anti-rectifier operation to the input tensor.

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected