Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack only takes scalars #4

Closed
bstadie opened this issue Aug 26, 2015 · 2 comments
Closed

Stack only takes scalars #4

bstadie opened this issue Aug 26, 2015 · 2 comments

Comments

@bstadie
Copy link
Contributor

bstadie commented Aug 26, 2015

cgt.stack takes scalar inputs. There is currently no easy way to stack tensors.

The python backend actually uses np.array to do the stacking, so it will work as-is. The CPP backend would need some modification though to handle arbitrary stacking.

@joschu
Copy link
Owner

joschu commented Aug 28, 2015

Stack can be implemented in terms of reshape and concatenate. That's seems to me like the most attractive approach, though it does add some extra reshape ops.
One reason to do it that way is that we'll probably want some optimizations specific to the Concatenate op. (E.g., we can avoid ever actually copying the data, assuming we're concatenating along axis=0.)

@robertnishihara
Copy link
Contributor

This is addressed by #42.

@joschu joschu closed this as completed Oct 20, 2015
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants