ZhikangNiu / encodec-pytorch

unofficial implementation of the High Fidelity Neural Audio Compression

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No broadcast on buffer in DDP training?

tuanvu92 opened this issue · comments

commented

When using multi-gpu, why does buffer broadcast is disabled as in this line:
https://github.com/NoFish-528/encodec-pytorch/blob/bd734c5dd2327456cc4b230ed6b3af9afd3d3145/train_multi_gpu.py#L269

In EuclideanCodebook module, the codebook is stored as buffer:
https://github.com/NoFish-528/encodec-pytorch/blob/bd734c5dd2327456cc4b230ed6b3af9afd3d3145/quantization/core_vq.py#L143

In my opinion, the buffer should be synchronized across all devices. Therefore, broadcast_buffers flag must be set to True.

Thanks for your attention. Because it will lead to some error and I'don't know how to fix this bug.

commented

Thanks. Can you describe what is the error?
From this dicussion, I added the buffer sync after each backward calls.

scaler.scale(loss).backward()
distrib.sync_buffer(model.buffers())

Training on 7 GPUs seems good. I will update the results if it works.

Thanks. Can you describe what is the error? From this dicussion, I added the buffer sync after each backward calls. ` scaler.scale(loss).backward()

distrib.sync_buffer(model.buffers()) `

Training on 7 GPUs seems good. I will update the results if it works.

thx. I will follow your mentioned discussion. And I find you used amp training? it may not be stable.

哥们,你的码本是怎么训练的?

哥们,你的码本是怎么训练的?

论文里面有写码本如何训练的,EMA + commitment loss

哥们,你的码本是怎么训练的?

论文里面有写码本如何训练的,EMA + commitment loss

代码里有体现码本的东西吗?

哥们,你的码本是怎么训练的?

论文里面有写码本如何训练的,EMA + commitment loss

代码里有体现码本的东西吗?

代码里均有,包括官方仓库也有,请查看代码

哥们,你的码本是怎么训练的?

论文里面有写码本如何训练的,EMA + commitment loss

代码里有体现码本的东西吗?

代码里均有,包括官方仓库也有,请查看代码

方便微信沟通吗?我是海洋大学学生,研究方向是语音压缩。

哥们,你的码本是怎么训练的?

论文里面有写码本如何训练的,EMA + commitment loss

代码里有体现码本的东西吗?

代码里均有,包括官方仓库也有,请查看代码

方便微信沟通吗?我是海洋大学学生,研究方向是语音压缩。17806289786

issue沟通即可,codebook部分可以查看quantization部分,或者可以自己debug查看码本的部分。

哥们,你的码本是怎么训练的?

论文里面有写码本如何训练的,EMA + commitment loss

代码里有体现码本的东西吗?

代码里均有,包括官方仓库也有,请查看代码

方便微信沟通吗?我是海洋大学学生,研究方向是语音压缩。17806289786

issue沟通即可,codebook部分可以查看quantization部分,或者可以自己debug查看码本的部分。

你可以训练出梅尔频谱的训练码本吗?或者说梅尔频谱你一般怎么去量化?

哥们,你的码本是怎么训练的?

论文里面有写码本如何训练的,EMA + commitment loss

代码里有体现码本的东西吗?

代码里均有,包括官方仓库也有,请查看代码

方便微信沟通吗?我是海洋大学学生,研究方向是语音压缩。17806289786

issue沟通即可,codebook部分可以查看quantization部分,或者可以自己debug查看码本的部分。

你可以训练出梅尔频谱的训练码本吗?或者说梅尔频谱你一般怎么去量化?

对不起,没有研究过。你可以查看下其他的仓库,祝好。

哥们,你的码本是怎么训练的?

论文里面有写码本如何训练的,EMA + commitment loss

代码里有体现码本的东西吗?

代码里均有,包括官方仓库也有,请查看代码

方便微信沟通吗?我是海洋大学学生,研究方向是语音压缩。17806289786

issue沟通即可,codebook部分可以查看quantization部分,或者可以自己debug查看码本的部分。

你可以训练出梅尔频谱的训练码本吗?或者说梅尔频谱你一般怎么去量化?

对不起,没有研究过。你可以查看下其他的仓库,祝好。

可以推荐一个训练码本的github吗?

@tuanvu92 Can I ask your encodec training normal when you broadcast buffer?