Skip to content

SAPYB for BlockDataContainer #1997

Description

@samdporter

In order to work with other code (e.g SVRGFunction) BlockDataContainer.sapyb method needs to be able to accept out=None and should return a BlockDataContainer

    def sapyb(self, a, y, b, out, num_threads = NUM_THREADS):
        r'''performs axpby element-wise on the BlockDataContainer containers'''
        if out is None:
            out = self*0 
        kwargs = {'a':a, 'b':b, 'out':out, 'num_threads': NUM_THREADS}
        return self.binary_operations(BlockDataContainer.SAPYB, y, **kwargs)

Currently throws error in SVRG.approximate_gradient

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions