判断网络是否因果(causal)

import numpy as np
x = torch.randn(1, 4, 257, 251)  # [B, C, F, T]
x[:, :, :, -1:] = np.inf
encoder = Encoder_Block().eval()
with torch.no_grad():
    R1, R2, R3 = encoder(x)   # R1:[1, 16, 10, 257]  R2:[1, 32, 10, 129]  R3:[1, 64, 10, 65]
    print(R3)
    print(R1.shape, R2.shape, R3.shape)

参考链接:https://github.com/huyanxin/DeepComplexCRN/issues/14

posted @ 2022-11-15 10:36  2xxx  阅读(36)  评论(0)    收藏  举报