参考:
https://github.com/huawei-noah/Disout/blob/1c8591f36240b8591691a972c19c7f96134b52a5/disout.py
#Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
#This program is free software; you can redistribute it and/or modify it under the terms of the BSD 3-Clause License.
#This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the BSD 3-Clause License for more details.
import torch.nn as nn
import torch
import torch.nn.functional as F
import numpy as np
class Disout(nn.Module):