Added a test and test data path fix
This commit is contained in:
Родитель
39d12b5e58
Коммит
d3910edf62
|
@ -7,10 +7,6 @@
|
|||
import os
|
||||
import re
|
||||
|
||||
# Because of randomization in training we set a fixed random seed to ensure repeatable outputs
|
||||
from _cntk_py import set_fixed_random_seed
|
||||
set_fixed_random_seed(1)
|
||||
|
||||
abs_path = os.path.dirname(os.path.abspath(__file__))
|
||||
notebook = os.path.join(abs_path, "..", "..", "..", "..", "Tutorials", "CNTK_204_Sequence_To_Sequence.ipynb")
|
||||
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
# Copyright (c) Microsoft. All rights reserved.
|
||||
|
||||
# Licensed under the MIT license. See LICENSE.md file in the project root
|
||||
# for full license information.
|
||||
# ==============================================================================
|
||||
|
||||
import os, sys
|
||||
import numpy as np
|
||||
import shutil
|
||||
from cntk.device import try_set_default_device
|
||||
|
||||
abs_path = os.path.dirname(os.path.abspath(__file__))
|
||||
sys.path.append(os.path.join(abs_path, "..", "..", "..", "..", "Tutorials", "NumpyInterop"))
|
||||
|
||||
from FeedForwardNet import ffnet
|
||||
|
||||
TOLERANCE_ABSOLUTE = 1E-1
|
||||
|
||||
def test_numpyinterop_feedforwardnet_error(device_id):
|
||||
from cntk.ops.tests.ops_test_utils import cntk_device
|
||||
try_set_default_device(cntk_device(device_id))
|
||||
|
||||
test_error = ffnet()
|
||||
expected_test_error = 0.04
|
||||
|
||||
assert np.allclose(test_error, expected_test_error,
|
||||
atol=TOLERANCE_ABSOLUTE)
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Загрузка…
Ссылка в новой задаче