Permalink
Browse files

Class for neural Network

  • Loading branch information...
1 parent a271423 commit 2dc0ad2dbae0fd3080946c877946117339f961f5 @swvist committed Nov 12, 2011
Showing with 15 additions and 0 deletions.
  1. +15 −0 ocrn/neuralnet.py
View
@@ -0,0 +1,15 @@
+from pybrain.tools.shortcuts import buildNetwork
+import dataset
+
+class neuralnet:
+ def __init__(self, *args):
+ if len(args) >=2 :
+ self.nnet = buildNetwork(*args)
+ self.inputlayer = args[0]
+ self.outputlayer = args[len(args)-1]
+ self.nnet.sortModules()
+
+ print self.nnet
+ else:
+ print "Number of layers must be more than two\n"
+

0 comments on commit 2dc0ad2

Please sign in to comment.