deepy/core/neural_var.py
def apply(self, func, dim=None):
        """
        Apply a function to tensors.
        """
        output_dim = dim if dim else self.output_dim
        return NeuralVariable(func(self.tensor), output_dim)
def apply(self, func, dim=None):
        output_dim = dim if dim else self.output_dim
        return NeuralVariable(func(self.tensor), output_dim)
def apply ( self , func , dim = None ) : output_dim = dim if dim else self . output_dim return NeuralVariable ( func ( self . tensor ) , output_dim )
Apply a function to tensors.
Apply a function to tensors .