changeset 387:dace8b9743af

__str__ method
author Joseph Turian <turian@gmail.com>
date Tue, 08 Jul 2008 17:08:23 -0400
parents a474341861fa
children 98ca97cc9910
files simple_autoassociator.py/parameters.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/simple_autoassociator.py/parameters.py	Tue Jul 08 02:27:00 2008 -0400
+++ b/simple_autoassociator.py/parameters.py	Tue Jul 08 17:08:23 2008 -0400
@@ -26,3 +26,11 @@
             self.w2 = numpy.zeros((hidden_dimension, input_dimension))
             self.b1 = numpy.zeros(hidden_dimension)
             self.b2 = numpy.zeros(input_dimension)
+
+    def __str__(self):
+        s = ""
+        s += "w1: %s\n" % self.w1
+        s += "b1: %s\n" % self.b1
+        s += "w2: %s\n" % self.w2
+        s += "b2: %s\n" % self.b2
+        return s