DeepPSP / torch_ecg

Deep learning ECG models implemented using PyTorch
MIT License
183 stars 20 forks source link

have you implemented ATI-CNN? #2

Open nlpCSir opened 2 years ago

wenh06 commented 2 years ago

ATI-CNN is essentially a convolutional recurrent neural network (CRNN) with a VGG-like CNN backbone, It can be initiated for example

from copy import deepcopy

from torch_ecg.model_configs import ECG_CRNN_CONFIG
from torch_ecg.models import ECG_CRNN

model_config = deepcopy(ECG_CRNN_CONFIG)
model_config.cnn.name = "vgg16"
# rnn and attention can be changed like above
model = ECG_CRNN(["AF", "PVC"], 12, model_config)

Then the above model is almost an ATI-CNN, except that the attention module proposed in ATI-CNN is not implemented, but you can use the more commonly used se (Squeeze-and-Excitation, the default one), gc (Global Context), nl (Non-Local) instead.

nlpCSir commented 2 years ago

谢谢!作者您是否读过ATI-CNN的论文?我有些不太明白他的Spatial confusion过程是如何融合不同导联的信息的?如果可以,希望您能解惑

At 2022-05-06 22:12:59, "WEN Hao" @.***> wrote:

ATI-CNN is essentially a convolutional recurrent neural network (CRNN) with a VGG-like CNN backbone, It can be initiated for example

fromcopyimportdeepcopyfromtorch_ecg.model_configsimportECG_CRNN_CONFIGfromtorch_ecg.modelsimportECG_CRNNmodel_config=deepcopy(ECG_CRNN_CONFIG) model_config.cnn.name="vgg16"# rnn and attention can be changed like abovemodel=ECG_CRNN(["AF", "PVC"], 12, model_config)

Then the above model is almost an ATI-CNN, except that the attention module proposed in ATI-CNN is not implemented, but you can use the more commonly used se (Squeeze-and-Excitation, the default one), gc (Global Context), nl (Non-Local) instead.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

wenh06 commented 2 years ago

普通的convolution就是跨channel (lead)的,就把不同channel的信息融合到了一起 (除了所谓的depth-wise convolution, 把groups的数目设置成和in_channels一样。) 另外,ATI-CNN的最后的Attention应该和AttentivePooling是类似的。

nlpCSir commented 2 years ago

你好作者,关于您工具库的使用,请问我是否可以加您个联系方式,方便交流呢。我在使用的过程中发现了一些问题,如数据库无法加载等

wenh06 commented 2 years ago

你好作者,关于您工具库的使用,请问我是否可以加您个联系方式,方便交流呢。我在使用的过程中发现了一些问题,如数据库无法加载等

wenh06@gmail.com, 欢迎提BUG!