Comments (4)
Does this help?
from vits2_pytorch.
seems not the same issue. you can try below scripts:
import torch
import torch.nn as nn
import torch.jit as jit
class ReverseModule(nn.Module):
def __init__(self):
super(ReverseModule, self).__init__()
self.layers = nn.ModuleList([nn.Linear(10, 10) for _ in range(5)])
def forward(self, x):
reversed_layers = list(reversed(self.layers))
for layers in reversed_layers:
x = layer(x)
return x
model = ReverseModule()
scripted_module = torch.jit.script(model)
Where the reversed_layers = list(reversed(self.layers))
is the same as
Line 122 in 379527d
Torch.jit does not have support for
reversed()
from vits2_pytorch.
Will something like this work for flows?
import torch
import torch.nn as nn
import torch.jit as jit
class ReverseModule(nn.Module):
def __init__(self):
super(ReverseModule, self).__init__()
self.layers = nn.ModuleList([nn.Linear(10, 10) for _ in range(5)])
# convert to a mutable dict
self.layers = nn.ModuleDict({str(i): layer for i, layer in enumerate(self.layers)})
self.reversed_layers = nn.ModuleDict()
for i in range(len(self.layers) - 1, -1, -1):
self.reversed_layers[str(i)] = self.layers[str(i)]
def forward(self, x):
for k, v in self.reversed_layers.items():
x = v(x)
return x
model = ReverseModule()
scripted_module = torch.jit.script(model)
from vits2_pytorch.
Hi @OnceJune , what are your versions of pytorch and repo ? I am trying to export jit and faces lots of issues like typing, missing module issues, etc..
from vits2_pytorch.
Related Issues (20)
- will more ckpts will be add later?
- KeyError when training the Chinese dataset HOT 4
- New feature: Deleting the old .pth files when training HOT 3
- ValueError: too many values to unpack (expected 2) HOT 5
- Checkpoint saves? HOT 1
- about duration-discriminator training objective HOT 8
- DurationDiscriminatorType error HOT 5
- how to know whether the model is fitting HOT 1
- Duration Discriminator problem HOT 18
- Training stuck HOT 18
- Where is L_mse? HOT 11
- colab error HOT 3
- Bad quality audio when infer with custom condition HOT 1
- good, how this combine to the bert-vits2? HOT 2
- Keep training on existed checkpoint HOT 3
- Training doesn´t start when speaker IDs isn´t sequential from 0 HOT 1
- hop size issue HOT 1
- Training using SDP (and with DP by ratio?) HOT 6
- Have anyone tried to decrease the feature channels of the model?
- AlignerNet instead of MAS HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vits2_pytorch.