Exemplo n.º 1
0
#!/usr/bin/env python3

import numpy as np
import os.path
import sys
from torch import optim

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))

from src import param
from src import network

parameters = param.Param()

net = network.Network()

input1234 = net.AddBinaryNodes(4)
# with size: 4

x = np.array([[0, 1, 0, 0],
              [1, 0, 1, 1]])


# print(input1234.val)

prod12 = net.AddProductNodes(3)
prod34 = net.AddProductNodes(3)

# with size: 3

mask12 = np.array([[1, 1, 0],
Exemplo n.º 2
0
 def setUp(self):
     """ Setting up for the test """
     self.param = param.Param()