summaryrefslogtreecommitdiff
path: root/network/logic_gates.py
diff options
context:
space:
mode:
Diffstat (limited to 'network/logic_gates.py')
-rw-r--r--network/logic_gates.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/network/logic_gates.py b/network/logic_gates.py
new file mode 100644
index 0000000..2a33d16
--- /dev/null
+++ b/network/logic_gates.py
@@ -0,0 +1,13 @@
+import torch
+
+
+def and_gate():
+ and_weights = torch.tensor([1, 1, -2])
+
+
+if __name__ == '__main__':
+ # x1, x2, b
+ X = torch.tensor([(0, 0, 1), (0, 1, 1), (1, 0, 1), (1, 1, 1)], dtype=torch.double)
+
+ print(X)
+ pass