(s)
| 8982 | return this._snake_case(target); |
| 8983 | } |
| 8984 | _snake_case(s) { |
| 8985 | const chars = []; |
| 8986 | let prev_lower = false; |
| 8987 | for (const c of s) { |
| 8988 | const x = c.toLowerCase(); |
| 8989 | if (prev_lower && x !== c) { |
| 8990 | chars.push('_'); |
| 8991 | } else { |
| 8992 | prev_lower = true; |
| 8993 | } |
| 8994 | chars.push(x); |
| 8995 | } |
| 8996 | return chars.join(''); |
| 8997 | } |
| 8998 | }); |
| 8999 | this.registerType('torch.fx.graph_module._CodeOnlyModule', class extends torch.nn.modules.module.Module { |
| 9000 | constructor(body) { |