def cost_for_params(self, params, x, y=None):
        curr_params = self.get_params()
        self.set_params(params)
        cost = self.cost(x, y=y)
        # revert params
        self.set_params(curr_params)
        return cost
Calculates the cost of the network for the specified inputs and the specified network
dataset/ETHPy150Open bbabenko/simple_convnet/simple_convnet/convnet.py/NNet.cost_for_params