01e38acffe
Download from 4shared
For Linux/Unix/BSD users
# Copyright (c) Facebook, Inc. and its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
#
# 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.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import absolute_import
from onnx import defs
from onnx import helper
from. import graph_transformer_test_base
from..utils import test_utils
def test_graph_transformer_encoder_decoder():
s = helper.make_encoder_decoder_test_case()
x = test_utils.make_placeholder(s.X, [5, 3])
y = test_utils.make_placeholder(s.Y, [5, 3])
x_data = [helper.make_tensor([[1., 2.], [3., 4.]]) for _ in range(5)]
y_data = [helper.make_tensor([[1., 2.], [3., 4.]]) for _ in range(5)]
results = defs.GraphTransformerEncoderDecoder(
s, x, x_data, y, y_data)
graph_transformer_test_base.run_tests(s, results, test_utils.run_do_main)
if __name__ == '__main__':
Related links:
Comments