diff --git a/libnd4j/include/ops/declarable/generic/transforms/hashcode.cpp b/libnd4j/include/ops/declarable/generic/transforms/hashcode.cpp index 644d15a58..123001dda 100644 --- a/libnd4j/include/ops/declarable/generic/transforms/hashcode.cpp +++ b/libnd4j/include/ops/declarable/generic/transforms/hashcode.cpp @@ -27,7 +27,7 @@ namespace nd4j { namespace ops { - REDUCTION_OP_IMPL(hashcode, 1, 1, false, 0, 0) { + CUSTOM_OP_IMPL(hashcode, 1, 1, false, 0, 0) { REQUIRE_TRUE(block.width() == 1, 0, "hashcode: this op can't be applied along dimension"); auto input = INPUT_VARIABLE(0); @@ -40,6 +40,10 @@ namespace nd4j { return Status::OK(); }; + DECLARE_SHAPE_FN(hashcode) { + return SHAPELIST(ConstantShapeHelper::getInstance()->scalarShapeInfo(nd4j::DataType::INT64)); + } + DECLARE_TYPES(hashcode) { getOpDescriptor() diff --git a/libnd4j/include/ops/declarable/headers/transforms.h b/libnd4j/include/ops/declarable/headers/transforms.h index 6c82aa19f..ab4e962a3 100644 --- a/libnd4j/include/ops/declarable/headers/transforms.h +++ b/libnd4j/include/ops/declarable/headers/transforms.h @@ -213,7 +213,7 @@ namespace nd4j { * This operation calculates hash code, optionally along dimension */ #if NOT_EXCLUDED(OP_hashcode) - DECLARE_REDUCTION_OP(hashcode, 1, 1, false, 0, 0); + DECLARE_CUSTOM_OP(hashcode, 1, 1, false, 0, 0); #endif /**