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
LinalgRefactor - specialpurpose #3767
Conversation
#undef BACKEND_GENERIC_SOFTMAX | ||
|
||
/** | ||
* Wrapper method of squared error method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space
@@ -127,6 +133,16 @@ class LinalgBackendEigen : public LinalgBackendBase | |||
DEFINE_FOR_NON_INTEGER_PTYPE(BACKEND_GENERIC_CHOLESKY_SOLVER, SGMatrix) | |||
#undef BACKEND_GENERIC_CHOLESKY_SOLVER | |||
|
|||
/** Implementation of @see linalg::cross_entropy */ | |||
#define BACKEND_GENERIC_CROSS_ENTROPY(Type, Container) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent
multiply_by_rectified_linear_derivative_impl(a, result); \ | ||
} | ||
DEFINE_FOR_REAL_PTYPE(BACKEND_GENERIC_MULTIPLY_BY_RECTIFIED_LINEAR_DERIV, SGMatrix) | ||
#undef BACKEND_GENERIC_MULTIPLY_BY_RECTIFIED_LINEAR_DERIV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non integer real.
Interger doesn't really make sense here.
softmax_impl(a); \ | ||
} | ||
DEFINE_FOR_REAL_PTYPE(BACKEND_GENERIC_SOFTMAX, SGMatrix) | ||
#undef BACKEND_GENERIC_SOFTMAX |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non integer real
typename SGMatrix<T>::EigenMatrixXtMap a_eig = a; | ||
|
||
auto max = a_eig.maxCoeff(); | ||
for (index_t j = 0; j < a.num_cols; ++j) //a.num_cols; ++j) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
@@ -85,6 +85,17 @@ class LinalgBackendViennaCL : public LinalgBackendGPUBase | |||
DEFINE_FOR_ALL_PTYPE(BACKEND_GENERIC_IN_PLACE_ADD, SGMatrix) | |||
#undef BACKEND_GENERIC_ADD | |||
|
|||
|
|||
/** Implementation of @see linalg::cross_entropy */ | |||
#define BACKEND_GENERIC_CROSS_ENTROPY(Type, Container) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent
|
||
result.gpu_ptr = std::shared_ptr<GPUMemoryBase<T>>( | ||
result_gpu->clone_vector(result_gpu,a.num_rows*a.num_cols)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
@@ -444,6 +444,8 @@ struct cross_entropy<Backend::EIGEN3,Matrix> | |||
} | |||
}; | |||
|
|||
|
|||
|
|||
#ifdef HAVE_VIENNACL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete
89211a2
to
33517d0
Compare
Hi @geektoni Could you help me look at my format-check results? |
Hi @OXPHOS. What I found is that:
namespace b {
class a {
public:
#define BEAUTIFUL_MACRO() /* This won't respect namespace and class indent*/
void method(...) \
{
.... \
}
OTHER_MACRO_CALL() /* this is aligned to public keyword below */
#undef BEAUTIFUL_MACRO /* The same as #define */
};
} Unfortunately, I don't think this last behaviour can be fixed easily. I also see you applied the changes suggested by clang-format, but Travis still fails. Could you please run the same command again? Could you tell me also the clang-format version that you're using? Thanks :) |
a5686eb
to
60f81d8
Compare
@geektoni Sorry about my late reply..I was away for the last month. We were talking about that Also, I think that the diffs on travis after I performed |
@OXPHOS no problem!
Backslash alignment is just to make the code prettier, so it is fine not doing it. However, we should use
What do you mean here? It seems that a piece of information is missing. Are you talking about installing clang-format-3.8 on OSX? |
60f81d8
to
1bcd948
Compare
@geektoni Yes I was wondering how to install clang-format-3.8 on OSX. |
04b35a1
to
b3289d1
Compare
Can we push this in? |
b3289d1
to
df1ecf3
Compare
No description provided.