/******************************************************************************* * Copyright (c) 2015-2019 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. * * SPDX-License-Identifier: Apache-2.0 ******************************************************************************/ // // @author raver119@gmail.com // #include "testlayers.h" #include #include #include #include #include using namespace nd4j; class DeclarableOpsTests19 : public testing::Test { public: DeclarableOpsTests19() { printf("\n"); fflush(stdout); } }; TEST_F(DeclarableOpsTests19, test_conv1d_bp_1) { /* DynamicCustomOp op = DynamicCustomOp.builder("conv1d_bp") .addInputs( Nd4j.create(DataType.FLOAT, 2,2,12), Nd4j.create(DataType.FLOAT, 3,2,3), Nd4j.create(DataType.FLOAT, 2,3,6) ) .addOutputs( Nd4j.create(DataType.FLOAT, 2,2,12), Nd4j.create(DataType.FLOAT, 3,2,3)) .addIntegerArguments(3,2,0,1,2,0) .build(); Nd4j.exec(op); */ auto t = NDArrayFactory::create('c', {2, 2, 12}); auto u = NDArrayFactory::create('c', {3, 2, 3}); auto v = NDArrayFactory::create('c', {2, 3, 6}); nd4j::ops::conv1d_bp op; auto result = op.evaluate({&t, &u, &v}, {3, 2, 0, 1, 2,0}); ASSERT_EQ(Status::OK(), result->status()); delete result; }