- removed
static_assert(std::is_same<SType, DType>::value,"The Scalar type must match the Tensor data type");
, compilation is ok static_assert SType == DType
fails at compile time, now after remove, fails at runtime (will see moreXX op Not implemented
)- to expect some hidden bug when
SType != DType
- ok:
- int tensor and int tensor operation (
test_onnx_backend.py
) - int tensor and int scalar
- nrm2() on int tensor (used tmp tensor with type cast)
- float tensor and int scalar ops
- cuda + int (after added cuda+int in
TYPE_LANG_SWITCH
- int tensor and int tensor operation (
- not ok:
- int tensor and float tensor ops (is it useful?)
- int tensor and float scalar (is it useful?)
- drawback 1. need to add
tmp
tensor to cast type, 2. need to implementint
version of function again for currentfloat
- loss could descend for a few iterations, but later loss ascend to 0.2 quickly (margin = 0.2, so loss 0.2 is not usable)
- implemented
get_Wx(weights)/get_Wh(weights)/get_Bx(weights)...
by getting cudnn rnn weight gpu memory offset. - use
get_Wx(weights)
to set exactly same weights with pytorch for comparison - given same input, singa rnn and pytorch rnn give same forward and backward output
- given same input, singa loss fn and pytorch loss fn give same forward and backward output
- given same input, singa cos sim fn and pytorch cos sim fn give same forward, but different backward output