Comments (2)
目前已解决,解决方法如下:
问题原因:fsmn.py 文件 class FSMN(nn.Module) 类的 forward 函数中的 torch.cat(in_cache, dim=-1) 会一直复制占用内存,导致内存不断升高。
更改方法:将这一行代码拆开这样写就可以了
# x7 = self.softmax(x6)
x7, _ = x6
# return x7, None
# ===============================
cat_size = sum(tensor.size(-1) for tensor in in_cache)
ret_cache = torch.zeros([in_cache[0].shape[0], in_cache[0].shape[1], in_cache[0].shape[2], cat_size])
for i in range(cat_size):
ret_cache[:, :, :, i] = in_cache[i].detach().squeeze(-1)
# ===============================
return x7, ret_cache
from wekws.
我对 fsmn 不太熟,@duj12 靖哥你看这里的 detach() 会影响 fsmn 的训练吗
from wekws.
Related Issues (20)
- 内存溢出 HOT 1
- fsmn模型无法在android上运行。 HOT 11
- Loss didn’t drop when training FSMN_CTC. HOT 15
- stream推理运行时间久后就很难唤醒 HOT 3
- run_fsmn_ctc.sh num_keywords HOT 1
- ds_tcn convert to tflite model to be a large model HOT 1
- have a ready-made onnx file? HOT 3
- Train and stream HOT 2
- 执行wekws/examples/speechcommand_v1/s0/run.sh 报错:KeyError: 'num_layers' HOT 1
- examples/speechcommand_v1/s0 训练的ONNX模型可以转换成ort格式吗 HOT 4
- examples/speechcommand_v1/s0训练的模型在android系统上怎么运行? HOT 2
- A potential problem on training batch size HOT 2
- Number of validation utterance HOT 1
- fbank window function discrepancy between training and deployment
- effect of local shuffle
- 训练的mdtc small模型推理输出概率总是在第一唤醒词 HOT 2
- About c++11 Using smart Pointers causes source code error protection problems HOT 1
- 在stream_kws_ctc.py中注释的是每0.3秒推理一次,但是interval = int(0.3 * 16000) *2,这里为什么要乘2?
- torch.distributed.elastic.rendezvous.api.RendezvousConnectionError: The connection to the C10d store has failed. See inner exception for details.
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 wekws.