From 601690d19953390b91eba932ef2231953f28523a Mon Sep 17 00:00:00 2001 From: David Turner Date: Wed, 8 Jan 2025 18:06:12 -0500 Subject: [PATCH] Remove upper pin on PNL, add lower pin. Fix stroop example to use input_shapes in place of size. --- .../PsyNeuLink/stroop_conflict_monitoring.py | 16 ++++++++-------- setup.cfg | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/PsyNeuLink/stroop_conflict_monitoring.py b/examples/PsyNeuLink/stroop_conflict_monitoring.py index 4dce1fe7..0257bc4e 100644 --- a/examples/PsyNeuLink/stroop_conflict_monitoring.py +++ b/examples/PsyNeuLink/stroop_conflict_monitoring.py @@ -5,14 +5,14 @@ # Construct the color naming pathway: color_input = pnl.ProcessingMechanism( - name="color_input", size=2 + name="color_input", input_shapes=2 ) # Note: default function is Linear color_input_to_hidden_wts = np.array([[2, -2], [-2, 2]]) color_hidden = pnl.ProcessingMechanism( - name="color_hidden", size=2, function=pnl.Logistic(bias=-4) + name="color_hidden", input_shapes=2, function=pnl.Logistic(bias=-4) ) color_hidden_to_output_wts = np.array([[2, -2], [-2, 2]]) -output = pnl.ProcessingMechanism(name="OUTPUT", size=2, function=pnl.Logistic) +output = pnl.ProcessingMechanism(name="OUTPUT", input_shapes=2, function=pnl.Logistic) color_pathway = [ color_input, color_input_to_hidden_wts, @@ -22,10 +22,10 @@ ] # Construct the word reading pathway (using the same output_layer) -word_input = pnl.ProcessingMechanism(name="word_input", size=2) +word_input = pnl.ProcessingMechanism(name="word_input", input_shapes=2) word_input_to_hidden_wts = np.array([[3, -3], [-3, 3]]) word_hidden = pnl.ProcessingMechanism( - name="word_hidden", size=2, function=pnl.Logistic(bias=-4) + name="word_hidden", input_shapes=2, function=pnl.Logistic(bias=-4) ) word_hidden_to_output_wts = np.array([[3, -3], [-3, 3]]) word_pathway = [ @@ -37,8 +37,8 @@ ] # Construct the task specification pathways -task_input = pnl.ProcessingMechanism(name="task_input", size=2) -task = pnl.LCAMechanism(name="TASK", size=2, initial_value=[0.5, 0.5]) +task_input = pnl.ProcessingMechanism(name="task_input", input_shapes=2) +task = pnl.LCAMechanism(name="TASK", input_shapes=2, initial_value=[0.5, 0.5]) task_color_wts = np.array([[4, 4], [0, 0]]) task_word_wts = np.array([[0, 0], [4, 4]]) task_color_pathway = [task_input, task, task_color_wts, color_hidden] @@ -53,7 +53,7 @@ name="CONTROL", objective_mechanism=pnl.ObjectiveMechanism( name="Conflict Monitor", - function=pnl.Energy(size=2, matrix=[[0, -2.5], [-2.5, 0]]), + function=pnl.Energy(input_shapes=2, matrix=[[0, -2.5], [-2.5, 0]]), monitor=output, ), default_allocation=[0.5], diff --git a/setup.cfg b/setup.cfg index 4d6792f3..b1273550 100644 --- a/setup.cfg +++ b/setup.cfg @@ -55,7 +55,7 @@ package_dir = [options.extras_require] psyneulink = - psyneulink<=0.15.1.0 + psyneulink>=0.15.3 neuroml = pyNeuroML>=1.0.10