mirror of
https://github.com/storytold/torchscript-models.git
synced 2026-10-19 07:42:59 +00:00
code block hinting
This commit is contained in:
@@ -29,18 +29,18 @@ Only two changes!
|
|||||||
|
|
||||||
Hardcode a few constructor args. These come from `inference.py`'s arg set:
|
Hardcode a few constructor args. These come from `inference.py`'s arg set:
|
||||||
|
|
||||||
```
|
```python
|
||||||
def forward(self, x, x_lengths, y=None, y_lengths=None, g=None, gen=False, noise_scale=1., length_scale=1.):
|
def forward(self, x, x_lengths, y=None, y_lengths=None, g=None, gen=False, noise_scale=1., length_scale=1.):
|
||||||
y = None
|
y = None
|
||||||
y_lengths = None
|
y_lengths = None
|
||||||
noise_scale = .667
|
noise_scale = .667
|
||||||
length_scale = 1.0
|
length_scale = 1.0
|
||||||
gen = True
|
gen = True
|
||||||
```
|
```
|
||||||
|
|
||||||
Return only the mel output at the end of the `forward` branch used in tracing:
|
Return only the mel output at the end of the `forward` branch used in tracing:
|
||||||
|
|
||||||
```
|
```python
|
||||||
#return (y, y_m, y_logs, logdet), attn, logw, logw_, x_m, x_logs
|
#return (y, y_m, y_logs, logdet), attn, logw, logw_, x_m, x_logs
|
||||||
return y
|
return y
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user