comparison sandbox/rbm/main.py @ 406:c2e6a8fcc35e

Globals are now parameters for the RBM model
author Joseph Turian <turian@gmail.com>
date Thu, 10 Jul 2008 02:10:23 -0400
parents ffdd2c199f2a
children
comparison
equal deleted inserted replaced
405:be4209cd568f 406:c2e6a8fcc35e
14 nonzero_instances.append({1: 0.1, 5: 0.5, 9: 1}) 14 nonzero_instances.append({1: 0.1, 5: 0.5, 9: 1})
15 nonzero_instances.append({2: 0.3, 5: 0.5, 8: 0.8}) 15 nonzero_instances.append({2: 0.3, 5: 0.5, 8: 0.8})
16 nonzero_instances.append({1: 0.2, 2: 0.3, 5: 0.5}) 16 nonzero_instances.append({1: 0.2, 2: 0.3, 5: 0.5})
17 17
18 import model 18 import model
19 model = model.Model() 19 model = model.Model(input_dimension=10, hidden_dimension=6)
20 20
21 for i in xrange(100000): 21 for i in xrange(100000):
22 # Select an instance 22 # Select an instance
23 instance = nonzero_instances[i % len(nonzero_instances)] 23 instance = nonzero_instances[i % len(nonzero_instances)]
24 24