decentralization的首字母,单词翻译中文是去中心化,即DApp为去中心化应用。

 

因为DApp直接和区块链技术挂钩,和交易数据、交易资产有关联,和不可篡改去中心化存储有关联,所以随着区块链技术越来越成熟普及,DApp将越来越受重视,并更多地出现在各个生活场景中。

def safe_log(self, x):

    """ Prevents :math:`log(0)` by using :math:`log(max(x, eps))`."""

    return torch.log(torch.clamp(x, min=1e-6))

 

def forward(self, x):

    # input shape (batch_size, C, T)

    if len(x.shape) is not 4:

        x = torch.unsqueeze(x, 1)

    # input shape (batch_size, 1, C, T)

    x = self.temp_conv(x)

    x = self.spat_conv(x)

    x = self.bn(x)

    x = x*x # conv_activate

    x = self.pooling(x)

    x = self.safe_log(x) # pool_activate

    x = self.dropout(x)

    x = self.class_conv(x)

    x= self.softmax(x)

    out = torch.squeeze(x)

 

    return out