Skip to content

Commit

Permalink
Update some legacy code examples. (#3814)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhyolight authored Mar 8, 2018
1 parent 33052e1 commit 13c02de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/examples/network/example-add-tm.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
tmParams = modelParams["tmParams"]
network.addRegion("TM", "py.TPRegion", json.dumps(tmParams))
network.addRegion("TM", "py.TMRegion", json.dumps(tmParams))
12 changes: 6 additions & 6 deletions docs/examples/network/example-create-regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
network.addRegion("sensor", "py.RecordSensor", json.dumps({"verbosity": 0}))

# Make sure the SP input width matches the sensor region output width.
model_params["spParams"]["inputWidth"] = sensorRegion.encoder.getWidth()
modelParams["spParams"]["inputWidth"] = sensorRegion.encoder.getWidth()

# Add the SP and TM regions.
network.addRegion("SP", "py.SPRegion", json.dumps(model_params["spParams"]))
network.addRegion("TM", "py.TPRegion", json.dumps(model_params["tmParams"]))
network.addRegion("SP", "py.SPRegion", json.dumps(modelParams["spParams"]))
network.addRegion("TM", "py.TMRegion", json.dumps(modelParams["tmParams"]))

# Add the classifier region.
clName = "py.%s" % model_params[]
network.addRegion("classifier", , json.dumps(model_params["clParams"]))
clName = "py.%s" % modelParams[]
network.addRegion("classifier", , json.dumps(modelParams["clParams"]))



Expand All @@ -38,7 +38,7 @@
sensorRegion.dataSource = dataSource

# Set the encoder to the sensor region
sensorRegion.encoder = createEncoder(model_params["sensorParams"]["encoders"])
sensorRegion.encoder = createEncoder(modelParams["sensorParams"]["encoders"])



Expand Down

0 comments on commit 13c02de

Please sign in to comment.