etaler / Etaler

A flexable HTM (Hierarchical Temporal Memory) framework with full GPU support.
BSD 3-Clause "New" or "Revised" License
89 stars 14 forks source link

Rework of the view/indexing system #126

Closed marty1885 closed 4 years ago

marty1885 commented 4 years ago

The current indexing system although works, is not compliant to PyTorch and NumPy. For example in numpy np.zeros(4, 4)[:, 1].shape results in (4, ). But in Etaler, zeros({4, 4}),view({all(), 1}).shape() will return Shape{4, 1}. This is due to show resulting shape is calculate and we pass the Range type for indexing and there's no way to separate when we are indexing via a range or a single value.