Skip to content

Commit

Permalink
Add vspace support for cupy
Browse files Browse the repository at this point in the history
  • Loading branch information
bartvm committed Jul 31, 2017
1 parent 48c7096 commit 506840b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions autograd/cupy/cupy_extra.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ def __init__(self, value):
def zeros(self):
return acp.zeros(self.shape, dtype=self.dtype)

def ones(self):
return acp.ones(self.shape, dtype=self.dtype)

def flatten(self, value, covector=False):
return acp.ravel(value)

Expand Down
1 change: 1 addition & 0 deletions autograd/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from builtins import range

import autograd.numpy as np
import autograd.cupy as cp
from autograd.convenience_wrappers import grad
from autograd.core import vspace, vspace_flatten, getval

Expand Down

0 comments on commit 506840b

Please sign in to comment.