Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

edgarriba
Copy link
Member

This pull requests pretends to substitute the current tensor_t by a full OOP Tensor class.

This is subsequent work from #319 and #411.

edgarriba and others added 6 commits November 22, 2016 23:33
…mult, div

move data pointer to unique_ptr and fix data accessors

transfer tensor data to device

rename members, add fromDevice() and accessors methods

convert to templated class

refactor constructor and minor changes

implement make_unique

fix zero-overhead accessor

initialize vector with aligned data

refactor and add more accessor tests

avoid copy when return shape()

update fromDevice() routine

update licence header and fix bound check

implement fill routine

implement element-wise add, sub, mul, div

add move semantics

add shape checking in element-wise operations

removing throw exception, adding assert instead

add std::numeric_limit<U>::min() to avoid zero division
Add sqrt to tensor

Add exp to tensor

codestyle
… precision

fix typo errors in tests

fix tensor operations tests to avoid fp related problems

add more tests to handle tensor shape mismatch

fix zero division issue

fix sqrt error for negative numbers

add destructor,copy ctors, and code cleaning

remove small value sum in div

fix tests precision

workaround solution for unique_ptr in move/copy ctors
- renamed private method resize to public reshape
- moved checks to toDevice/fromDevice
- moved operations to non-member functions (layer_*), except fill
- fixed tests
avoid copy when return shape()

update fromDevice() routine

implement element-wise add, sub, mul, div
Fixing errors revealed by travis

Fixed VS2012 mistake

Fixed VS2012 mistake again
@edgarriba edgarriba merged commit dda85b9 into tiny-dnn:master Nov 23, 2016
@pansk
Copy link
Contributor

pansk commented Nov 23, 2016

In my version, when I merged the change from cnn_size_t to tensor_size_t (which reflects in your commit 0012555) I also fixed the alignment of parameters from all the methods of class Template.
It's quite confusing having the parameters aligned with the code, you won't see when the parameter list end and when the code begins, I rather have them in a single line (exceeding line length), or having them aligned with the first parameter.
Can you bring in that version?

@edgarriba
Copy link
Member Author

@pansk
Copy link
Contributor

pansk commented Nov 24, 2016

Oh, I see.
That commit was modified by me during the merge, and I only did a partial work, and solved with the next commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants