comparison mlp_factory_approach.py @ 265:ae0a8345869b

commented junk in the default test (main function) of mlp_factory_approach so the test still works
author Thierry Bertin-Mahieux <bertinmt@iro.umontreal.ca>
date Wed, 04 Jun 2008 17:34:01 -0400
parents a1793a5e9523
children eded3cb54930
comparison
equal deleted inserted replaced
264:a1793a5e9523 265:ae0a8345869b
315 self.failUnless(n_match == (numpy.sum(training_set1.fields()['target'] == 315 self.failUnless(n_match == (numpy.sum(training_set1.fields()['target'] ==
316 training_set2.fields()['target'])), omatch) 316 training_set2.fields()['target'])), omatch)
317 317
318 model1.save('/tmp/model1') 318 model1.save('/tmp/model1')
319 319
320 denoising_aa = GraphLearner(denoising_g) 320 #denoising_aa = GraphLearner(denoising_g)
321 model1 = denoising_aa(trainset) 321 #model1 = denoising_aa(trainset)
322 hidset = model(trainset, fieldnames=['hidden']) 322 #hidset = model(trainset, fieldnames=['hidden'])
323 model2 = denoising_aa(hidset) 323 #model2 = denoising_aa(hidset)
324 324
325 f = open('blah', 'w') 325 #f = open('blah', 'w')
326 for m in model: 326 #for m in model:
327 m.save(f) 327 # m.save(f)
328 filetensor.write(f, initial_classification_weights) 328 #filetensor.write(f, initial_classification_weights)
329 f.flush() 329 #f.flush()
330 330
331 deep_sigmoid_net = GraphLearner(deepnetwork_g) 331 #deep_sigmoid_net = GraphLearner(deepnetwork_g)
332 deep_model = deep_sigmoid_net.load('blah') 332 #deep_model = deep_sigmoid_net.load('blah')
333 deep_model.update(trainset) #do some fine tuning 333 #deep_model.update(trainset) #do some fine tuning
334 334
335 model1_dup = learn_algo('/tmp/model1') 335 model1_dup = learn_algo('/tmp/model1')
336 336
337 337
338 def equiv(self, g0, g1): 338 def equiv(self, g0, g1):