Esempio n. 1
0
    def test_graph_parameters(self):
        np.random.seed(0)
        net1 = Vector(10) >> Full(10)

        net2 = net1 >> Full(10)

        self.assertEqual(net1.get_state(), net2.left.get_state())
Esempio n. 2
0
    def test_graph_parameters(self):
        np.random.seed(0)
        net1 = Vector(10) >> Full(10)

        net2 = net1 >> Full(10)

        self.assertEqual(net1.get_state(), net2.left.get_state())
Esempio n. 3
0
    def test_freeze_parameters(self):
        np.random.seed(0)
        net1 = Vector(10) >> Linear(10)
        net1.initialize()

        self.assertEqual(net1.freeze().get_state(as_list=True),
                         net1.get_state(as_list=True))
Esempio n. 4
0
    def test_graph_parameters(self):
        np.random.seed(0)
        net1 = Vector(10) >> Linear(10)

        net2 = net1 >> Linear(10)

        self.assertEqual(net1.get_state(as_list=True), net2.left.get_state(as_list=True))
Esempio n. 5
0
    def test_graph_parameters(self):
        np.random.seed(0)
        net1 = Vector(10) >> Linear(10)

        net2 = net1 >> Linear(10)

        self.assertEqual(net1.get_state(as_list=True),
                         net2.left.get_state(as_list=True))
Esempio n. 6
0
    def test_freeze_parameters(self):
        np.random.seed(0)
        net1 = Vector(10) >> Full(10)

        self.assertEqual(net1.freeze().get_state(), net1.get_state())
Esempio n. 7
0
 def test_freeze(self):
     net1 = Vector(10) >> Full(10)
     self.assertEqual(Freeze(net1).get_state(), net1.get_state())
     self.assertEqual(Freeze(net1).get_parameters(), [])
Esempio n. 8
0
    def test_freeze_parameters(self):
        np.random.seed(0)
        net1 = Vector(10) >> Full(10)

        self.assertEqual(net1.freeze().get_state(), net1.get_state())
Esempio n. 9
0
 def test_freeze(self):
     net1 = Vector(10) >> Full(10)
     self.assertEqual(Freeze(net1).get_state(), net1.get_state())
     self.assertEqual(Freeze(net1).get_parameters(), [])
Esempio n. 10
0
    def test_freeze_parameters(self):
        np.random.seed(0)
        net1 = Vector(10) >> Linear(10)
        net1.initialize()

        self.assertEqual(net1.freeze().get_state(as_list=True), net1.get_state(as_list=True))