Signed-off-by: raver119 <raver119@gmail.com>
master
raver119 2020-02-25 15:20:51 +03:00
parent f6442b6724
commit cf67c7165a
2 changed files with 4 additions and 3 deletions

View File

@ -26,9 +26,10 @@
namespace nd4j {
namespace ops {
OP_IMPL(identity, 1, 1, true) {
auto z = OUTPUT_VARIABLE(0);
if (!block.isInplace()) {
auto first = INPUT_VARIABLE(0);
auto z = OUTPUT_VARIABLE(0);
// we hope for memcpy here
z->assign(first);

View File

@ -26,10 +26,10 @@
namespace nd4j {
namespace ops {
OP_IMPL(stop_gradient, 1, 1, true) {
auto out = OUTPUT_VARIABLE(0);
if (!block.isInplace()) {
auto x = INPUT_VARIABLE(0);
auto out = OUTPUT_VARIABLE(0);
// we hope for memcpy here
out->assign(x);
}