crypten/gradients.py [407:418]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @staticmethod
    def forward(ctx, *args, **kwargs):

        # preprocess inputs:
        assert len(args) >= 1
        if len(args) == 1:
            (input,) = args  # no dimension to squeeze in args
            dim = kwargs.get("dim", None)
        else:
            assert len(args) == 2
            assert "dim" not in kwargs
            input, dim = args  # dimension to squeeze in args
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



crypten/gradients.py [1191:1202]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @staticmethod
    def forward(ctx, *args, **kwargs):

        # preprocess inputs:
        assert len(args) >= 1
        if len(args) == 1:
            (input,) = args  # no dimension to average over in args
            dim = kwargs.get("dim", None)
        else:
            assert len(args) == 2
            assert "dim" not in kwargs
            input, dim = args  # dimension to average over in args
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



