linear.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:sef 作者: passalis 项目源码 文件源码
def __init__(self, input_dimensionality, output_dimensionality, scaler='default'):
        """
        Creats a Linear SEF object
        :param input_dimensionality: dimensionality of the input space
        :param output_dimensionality: dimensionality of the target space
        :param learning_rate: learning rate to be used for the optimization
        :param regularizer_weight: the weight of the regularizer
        :param scaler:
        """

        # Call base constructor
        SEF_Base.__init__(self, input_dimensionality, output_dimensionality, scaler)

        # Projection weights variables
        W = np.float32(0.1 * np.random.randn(self.input_dimensionality, output_dimensionality))
        self.W = Variable(torch.from_numpy(W), requires_grad=True)
        self.trainable_params = [self.W]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号