Strip the optional PyTorch >= 2.13 ``, bias=True|False`` repr fragment. Args: text: Layer string representation to normalize. Returns: The representation with any ``, bias=True|False`` removed.
(text: str)
| 20 | |
| 21 | |
| 22 | def _strip_bias_field(text: str) -> str: |
| 23 | """Strip the optional PyTorch >= 2.13 ``, bias=True|False`` repr fragment. |
| 24 | |
| 25 | Args: |
| 26 | text: Layer string representation to normalize. |
| 27 | |
| 28 | Returns: |
| 29 | The representation with any ``, bias=True|False`` removed. |
| 30 | """ |
| 31 | return re.sub(r",\s*bias=(?:True|False)", "", text) |
| 32 | |
| 33 | |
| 34 | TEST_CASE_NORM = [ |
no outgoing calls
no test coverage detected
searching dependent graphs…