Comments (11)
I am sorry, as I said, I do not know about JIT containers...can you paste any link here, please? Thank you so much for the quick replies!
from silero-models.
We do not provide this feature out of the box
But you can just modify the model code
from silero-models.
I am unable to find the code for the model. Sorry, I am new to torch hub and torchscript
from silero-models.
It is public within the jit containers
from silero-models.
can you paste any link here, please?
This one for example - https://github.com/snakers4/silero-models/blob/master/models.yml#L9
This is what is loaded under the hood
from silero-models.
Adding a model with skip connections may be a good idea for a v3
But maintaining _q
/ onnx
flavors of this would be a chore
from silero-models.
This is what is loaded under the hood
Loading the model using torch.jit.load
and accessing .code
gives:
def forward(self,\n x: Tensor,\n calibrate: bool=False) -> Tensor:\n _0 = self.n_fft\n _1 = self.hop_length\n _2 = self.win_length\n _3 = torch.hann_window(self.n_fft, dtype=ops.prim.dtype(x), layout=None, device=ops.prim.device(x), pin_memory=None)\n x0 = __torch__.torch.functional.stft(x, _0, _1, _2, _3, True, "reflect", False, True, )\n _4 = torch.slice(x0, 0, 0, 9223372036854775807, 1)\n _5 = torch.slice(_4, 1, 0, 9223372036854775807, 1)\n _6 = torch.slice(_5, 2, 0, 9223372036854775807, 1)\n x_real = torch.select(_6, 3, 0)\n _7 = torch.slice(x0, 0, 0, 9223372036854775807, 1)\n _8 = torch.slice(_7, 1, 0, 9223372036854775807, 1)\n _9 = torch.slice(_8, 2, 0, 9223372036854775807, 1)\n x_imag = torch.select(_9, 3, 1)\n _10 = torch.add(torch.pow(x_real, 2), torch.pow(x_imag, 2), alpha=1)\n x1 = torch.sqrt(_10)\n x2 = (self.audio_normalize).forward(x1, )\n x3 = (self.quant).forward(x2, )\n x4 = (self.encoder).forward(x3, )\n x5 = (self.dequant).forward(x4, )\n _11 = self.decoder\n _12 = torch.contiguous(torch.permute(x5, [2, 0, 1]), memory_format=0)\n _13 = torch.permute((_11).forward(_12, None, None, ), [1, 2, 0])\n x6 = torch.contiguous(_13, memory_format=0)\n x7 = (self.fc).forward(x6, )\n x8 = torch.contiguous(torch.transpose(x7, 1, 2), memory_format=0)\n return (self.softmax).forward(x8, )
How can I get the "non-jit" style code?
from silero-models.
How can I get the "non-jit" style code?
We have not published the original code of our models for a number of reasons
More human readable code can be found just inside of jit containers (they are just pickled zips or vice versa)
from silero-models.
Okay. So, how can I modify the above non-human readable code to return at a specific point in the forward pass? I just want to return the output before the FC layer.
from silero-models.
these models were not really meant to be modified
if you would like to modify them anyway - please look inside of the containers manually (they should look like folders)
from silero-models.
Can you please let me know how to get the previous layer's output, just before FC? I want the output from the decoder, i.e, when I call model(input), I want the model to return the decoder's output instead of softmax probabilities.
from silero-models.
Related Issues (20)
- Feature request - [Tajik Language]
- ❓ Questions / Help / Support HOT 2
- Bug report - [X] HOT 1
- В v4_ru двоится голос у Баи и Ксении HOT 4
- Adding the Chinese language 汉语 for TTS HOT 7
- ❓ How to import TTS models in C++ HOT 1
- ❓ Questions / Help / Support
- Bug report - [v4 tts fails on debian 12] HOT 2
- ❓ How to rename saved wav files upon saving?
- Feature request for conversion of the models to coreml
- Bug report - [RunTime Error with latest Jit Spanish Model] HOT 2
- Feature request - [ONNX model of denoise_models]
- ❓ Questions / Help / Support
- Feature request -
- Can not read PT file HOT 1
- Text-Enhancement HOT 2
- Alignment output
- ❓ Questions / Help / Support HOT 1
- Please help me how to use Tamil language ?❓
- How to set model en_v6 while using torch.hub.load ❓ Questions / Help / Support
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 silero-models.