mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-03 16:52:39 +02:00
all tests either notimplemented or known to fail
This commit is contained in:
parent
6637eb7ac8
commit
a307d528ef
3 changed files with 4 additions and 4 deletions
34
GPy/old_tests/mapping_tests.py
Normal file
34
GPy/old_tests/mapping_tests.py
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# Copyright (c) 2012, 2013 GPy authors (see AUTHORS.txt).
|
||||
# Licensed under the BSD 3-clause license (see LICENSE.txt)
|
||||
|
||||
import unittest
|
||||
import numpy as np
|
||||
import GPy
|
||||
|
||||
|
||||
|
||||
class MappingTests(unittest.TestCase):
|
||||
|
||||
def test_kernelmapping(self):
|
||||
verbose = False
|
||||
mapping = GPy.mappings.Kernel(np.random.rand(10, 3), 2)
|
||||
self.assertTrue(GPy.core.mapping.Mapping_check_df_dtheta(mapping=mapping).checkgrad(verbose=verbose))
|
||||
self.assertTrue(GPy.core.mapping.Mapping_check_df_dX(mapping=mapping).checkgrad(verbose=verbose))
|
||||
|
||||
def test_linearmapping(self):
|
||||
verbose = False
|
||||
mapping = GPy.mappings.Linear(3, 2)
|
||||
self.assertTrue(GPy.core.Mapping_check_df_dtheta(mapping=mapping).checkgrad(verbose=verbose))
|
||||
self.assertTrue(GPy.core.Mapping_check_df_dX(mapping=mapping).checkgrad(verbose=verbose))
|
||||
|
||||
def test_mlpmapping(self):
|
||||
verbose = False
|
||||
mapping = GPy.mappings.MLP(input_dim=2, hidden_dim=[3, 4, 8, 2], output_dim=2)
|
||||
self.assertTrue(GPy.core.Mapping_check_df_dtheta(mapping=mapping).checkgrad(verbose=verbose))
|
||||
self.assertTrue(GPy.core.Mapping_check_df_dX(mapping=mapping).checkgrad(verbose=verbose))
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print "Running unit tests, please be (very) patient..."
|
||||
unittest.main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue