Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/backprop fct with multi args #2766

Merged
merged 26 commits into from
Aug 9, 2023
Merged

Conversation

jdcpni
Copy link
Collaborator

@jdcpni jdcpni commented Aug 8, 2023

• composition.py, learningmechanism.py and learningfunctions.py

  • add handling of partial differentials ("covariates") for BackPropagation learning

• combinationfunctions.py

  • add derivative for LinearCombination to Python implementation; still needs LLVM implementation, and support for LinearCombination Function in AutodiffComposition.

jdcpni added 21 commits August 3, 2023 19:36
• combinationfunctions.py
  LinearCombination.derivative: return Jacobian for first item in variable[0] relative to others

• composition.py
  _create_non_terminal_backprop_learning_components(): modify to handle multiple args in output_source for learning_function and learning_mechanism
• combinationfunctions.py
  LinearCombination.derivative: return Jacobian for first item in variable[0] relative to others

• composition.py
  _create_non_terminal_backprop_learning_components(): modify to handle multiple args in output_source for learning_function and learning_mechanism
• composition.py
  - _check_for_existing_projections():
    augment to search over all input_ports and output_ports;
    NOTE: if a mechanism is specified as sender and/or receiver, then any existing Projection between the two (i.e., between any pair of input_port/output_ports) will be returned as existing;  to support multiple projections (between different pairs of Ports), must specify Ports explicitly
- learningmechanism.py
  add support for COVARIATES
- learningmechanism.py
  continuing support for COVARIATES
  - fully refactored to use covariates

• composition.py
  _create_non_terminal_backprop_learning_components():  refactored to use covariates

 RUNS
  - make error_sources and covariates_sources Parameters
WORKING
# Conflicts:
#	psyneulink/core/compositions/composition.py
WORKING except LLVM failure for ComparatorMechanism
WORKING except LLVM failure for ComparatorMechanism
• component.py
  add error_sources and covariates_sources to blacklis for compilation (since they are lists of PNL objects) rather than ContentAddressableLists
…Link into feat/backprop_fct_with_multi_args

# Conflicts:
#	psyneulink/core/components/functions/nonstateful/combinationfunctions.py
#	psyneulink/core/components/functions/nonstateful/learningfunctions.py
#	psyneulink/core/compositions/composition.py
@github-actions
Copy link

github-actions bot commented Aug 8, 2023

This PR causes the following changes to the html docs (ubuntu-latest-3.7-x64):

diff -r docs-base/CombinationFunctions.html docs-head/CombinationFunctions.html
1098c1098,1099
< <dd class="field-odd"><p><strong>input</strong> (<em>1d</em><em> or </em><em>2d np.array : default class_defaults.variable</em>) – value of the input to the Linear transform at which derivative is to be taken.
---
> <dd class="field-odd"><ul class="simple">
> <li><p><strong>output</strong> (<em>1d np.array : default class_defaults.variable</em><em>[</em><em>0</em><em>]</em>) – <p>value of the input to the Linear transform at which derivative is to be taken.
1099a1101,1107
> <div class="technical-note docutils container">
> <p>output arg is used for consistency with other derivatives used by BackPropagation, and is ignored.</p>
> </div>
> </p></li>
> <li><p><strong>covariates</strong> (<em>2d np.array : default class_defaults.variable</em><em>[</em><em>1:</em><em>]</em>) – the input(s) to the LinearCombination function other than the one for which the derivative is being
> computed;  these are used to calculate the Jacobian of the LinearCombination function.</p></li>
> </ul>
diff -r docs-base/LearningFunctions.html docs-head/LearningFunctions.html
218a219,225
> <div class="technical-note docutils container">
> <p>The <code class="docutils literal notranslate"><span class="pre">_function</span></code> method of a LearningFunction <em>must</em> include a <strong>kwargs argument, which accomodates
> Function-specific parameters;  this is to accommodate the ability of LearningMechanisms to accomodate
> all LearningFunctions, by calling their ``_function`` method with arguments that may not be implemented
> for all LearningFunctions. Such arguments placed in the **params</strong> argument of the <code class="docutils literal notranslate"><span class="pre">_function</span></code> method
> of a LearningFunction by Component._execute, and passed to the LearningFunction’s <code class="docutils literal notranslate"><span class="pre">_function</span></code> method.</p>
> </div>
1335c1342
< <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.functions.learningfunctions.</span></span><span class="sig-name descname"><span class="pre">BackPropagation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_variable</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">activation_derivative_fct</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">learning_rate</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">loss_spec</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">owner</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prefs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation" title="Permalink to this definition">¶</a></dt>
---
> <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.functions.learningfunctions.</span></span><span class="sig-name descname"><span class="pre">BackPropagation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_variable</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">activation_derivative_fct</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">covariates</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">learning_rate</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">loss_spec</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">owner</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prefs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation" title="Permalink to this definition">¶</a></dt>
1357c1364
< <p>The values of <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_input</span></code></a>, <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a> and  <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_signal</span></code></a> are specified as
---
> <p>The values of <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_input</span></code></a>, <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a> and <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_signal</span></code></a> are specified as
1359,1362c1366,1375
< and in calls to its <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>.  Although <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_matrix" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_matrix</span></code></a>
< is not specified in the constructor, it is required as an argument of the <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>;
< it is assumed that it’s value is determined in context at the time of execution (e.g., by a <a class="reference internal" href="LearningMechanism.html"><span class="doc">LearningMechanism</span></a>
< that uses the BackPropagation LearningFunction).</p>
---
> and in calls to its <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>.  If the activation function (i.e., the <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span>
> <span class="pre">of</span> <span class="pre">that</span> <span class="pre">generates</span> <span class="pre">`activation_output</span></code></a>) takes more than one argument that
> influence its <code class="xref any docutils literal notranslate"><span class="pre">activation_function_derivative</span></code>, then a
> template for these (exhibiting their shape) must be passed in the <strong>covariates</strong> argument of the constructor
> for the BackPropagation Function, and the values of these must be specified in the <strong>covariates</strong> argument of
> a call to its <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>, which is passed in the <strong>params</strong> argument of to the
> _function method.</p>
> <p>Although <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_matrix" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_matrix</span></code></a> is not specified in the constructor, it must be provided
> in the <strong>error_matrix</strong> argument of a call to the <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>, which is passed in the
> <strong>params</strong> argument to the _function method.</p>
1376a1390,1392
> <li><p><strong>covariates</strong> (<em>List</em><em>[</em><em>1d array</em><em>]</em>) – specifies a template for values of arguments used by the <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_derivative_fct</span></code></a> other than <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_input</span></code></a>
> and <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a>, to compute the derivative of the activation
> function with respect to activation_output.</p></li>
1397,1398c1413,1415
< <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a>, and
< <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_signal</span></code></a>.</p>
---
> <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a>,
> <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_signal</span></code></a>, and
> <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.covariates" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.covariates"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">covariates</span></code></a>.</p>
1454a1472,1484
> <dt class="sig sig-object py" id="psyneulink.core.components.functions.learningfunctions.BackPropagation.covariates">
> <span class="sig-name descname"><span class="pre">covariates</span></span><a class="headerlink" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.covariates" title="Permalink to this definition">¶</a></dt>
> <dd><p>a template for the values of arguments used by the <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_derivative_fct</span></code></a> other than activation_input and activation_output, to compute
> the derivative of the activation function
> with respect to activation_output.</p>
> <dl class="field-list simple">
> <dt class="field-odd">Type</dt>
> <dd class="field-odd"><p>List[1d array]</p>
> </dd>
> </dl>
> </dd></dl>
> 
> <dl class="py attribute">
1599a1630,1632
> <li><p><strong>covariates</strong> (<em>List</em><em>[</em><em>1d array</em><em>]</em>) – values of arguments used by the <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_derivative_fct</span></code></a>
> other than activation_input and activation_output, to compute the derivative of the activation function
> with respect to <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a>.</p></li>
diff -r docs-base/LearningMechanism.html docs-head/LearningMechanism.html
330a331,353
> <ul id="learningmechanism-covariates">
> <li><p><em>COVARIATES</em> - one or more InputPorts that receive the value of the inputs to <code class="xref any docutils literal notranslate"><span class="pre">output_source</span> <span class="pre">(i.e.,</span> <span class="
...

See CI logs for the full diff.

@github-actions
Copy link

github-actions bot commented Aug 8, 2023

This PR causes the following changes to the html docs (ubuntu-latest-3.7-x64):

diff -r docs-base/CombinationFunctions.html docs-head/CombinationFunctions.html
1098c1098,1099
< <dd class="field-odd"><p><strong>input</strong> (<em>1d</em><em> or </em><em>2d np.array : default class_defaults.variable</em>) – value of the input to the Linear transform at which derivative is to be taken.
---
> <dd class="field-odd"><ul class="simple">
> <li><p><strong>output</strong> (<em>1d np.array : default class_defaults.variable</em><em>[</em><em>0</em><em>]</em>) – <p>value of the input to the Linear transform at which derivative is to be taken.
1099a1101,1107
> <div class="technical-note docutils container">
> <p>output arg is used for consistency with other derivatives used by BackPropagation, and is ignored.</p>
> </div>
> </p></li>
> <li><p><strong>covariates</strong> (<em>2d np.array : default class_defaults.variable</em><em>[</em><em>1:</em><em>]</em>) – the input(s) to the LinearCombination function other than the one for which the derivative is being
> computed;  these are used to calculate the Jacobian of the LinearCombination function.</p></li>
> </ul>
diff -r docs-base/LearningFunctions.html docs-head/LearningFunctions.html
218a219,225
> <div class="technical-note docutils container">
> <p>The <code class="docutils literal notranslate"><span class="pre">_function</span></code> method of a LearningFunction <em>must</em> include a <strong>kwargs argument, which accomodates
> Function-specific parameters;  this is to accommodate the ability of LearningMechanisms to accomodate
> all LearningFunctions, by calling their ``_function`` method with arguments that may not be implemented
> for all LearningFunctions. Such arguments placed in the **params</strong> argument of the <code class="docutils literal notranslate"><span class="pre">_function</span></code> method
> of a LearningFunction by Component._execute, and passed to the LearningFunction’s <code class="docutils literal notranslate"><span class="pre">_function</span></code> method.</p>
> </div>
1335c1342
< <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.functions.learningfunctions.</span></span><span class="sig-name descname"><span class="pre">BackPropagation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_variable</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">activation_derivative_fct</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">learning_rate</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">loss_spec</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">owner</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prefs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation" title="Permalink to this definition">¶</a></dt>
---
> <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.functions.learningfunctions.</span></span><span class="sig-name descname"><span class="pre">BackPropagation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_variable</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">activation_derivative_fct</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">covariates</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">learning_rate</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">loss_spec</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">owner</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prefs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation" title="Permalink to this definition">¶</a></dt>
1357c1364
< <p>The values of <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_input</span></code></a>, <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a> and  <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_signal</span></code></a> are specified as
---
> <p>The values of <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_input</span></code></a>, <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a> and <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_signal</span></code></a> are specified as
1359,1362c1366,1375
< and in calls to its <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>.  Although <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_matrix" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_matrix</span></code></a>
< is not specified in the constructor, it is required as an argument of the <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>;
< it is assumed that it’s value is determined in context at the time of execution (e.g., by a <a class="reference internal" href="LearningMechanism.html"><span class="doc">LearningMechanism</span></a>
< that uses the BackPropagation LearningFunction).</p>
---
> and in calls to its <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>.  If the activation function (i.e., the <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span>
> <span class="pre">of</span> <span class="pre">that</span> <span class="pre">generates</span> <span class="pre">`activation_output</span></code></a>) takes more than one argument that
> influence its <code class="xref any docutils literal notranslate"><span class="pre">activation_function_derivative</span></code>, then a
> template for these (exhibiting their shape) must be passed in the <strong>covariates</strong> argument of the constructor
> for the BackPropagation Function, and the values of these must be specified in the <strong>covariates</strong> argument of
> a call to its <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>, which is passed in the <strong>params</strong> argument of to the
> _function method.</p>
> <p>Although <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_matrix" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_matrix</span></code></a> is not specified in the constructor, it must be provided
> in the <strong>error_matrix</strong> argument of a call to the <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>, which is passed in the
> <strong>params</strong> argument to the _function method.</p>
1376a1390,1392
> <li><p><strong>covariates</strong> (<em>List</em><em>[</em><em>1d array</em><em>]</em>) – specifies a template for values of arguments used by the <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_derivative_fct</span></code></a> other than <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_input</span></code></a>
> and <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a>, to compute the derivative of the activation
> function with respect to activation_output.</p></li>
1397,1398c1413,1415
< <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a>, and
< <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_signal</span></code></a>.</p>
---
> <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a>,
> <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_signal</span></code></a>, and
> <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.covariates" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.covariates"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">covariates</span></code></a>.</p>
1454a1472,1484
> <dt class="sig sig-object py" id="psyneulink.core.components.functions.learningfunctions.BackPropagation.covariates">
> <span class="sig-name descname"><span class="pre">covariates</span></span><a class="headerlink" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.covariates" title="Permalink to this definition">¶</a></dt>
> <dd><p>a template for the values of arguments used by the <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_derivative_fct</span></code></a> other than activation_input and activation_output, to compute
> the derivative of the activation function
> with respect to activation_output.</p>
> <dl class="field-list simple">
> <dt class="field-odd">Type</dt>
> <dd class="field-odd"><p>List[1d array]</p>
> </dd>
> </dl>
> </dd></dl>
> 
> <dl class="py attribute">
1599a1630,1632
> <li><p><strong>covariates</strong> (<em>List</em><em>[</em><em>1d array</em><em>]</em>) – values of arguments used by the <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_derivative_fct</span></code></a>
> other than activation_input and activation_output, to compute the derivative of the activation function
> with respect to <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a>.</p></li>
diff -r docs-base/LearningMechanism.html docs-head/LearningMechanism.html
330a331,353
> <ul id="learningmechanism-covariates">
> <li><p><em>COVARIATES</em> - one or more InputPorts that receive the value of the inputs to <code class="xref any docutils literal notranslate"><span class="pre">output_source</span> <span class="pre">(i.e.,</span> <span class="
...

See CI logs for the full diff.

from psyneulink.core.components.ports.parameterport import ParameterPort
from psyneulink.core.components.ports.modulatorysignals.learningsignal import LearningSignal

Check notice

Code scanning / CodeQL

Cyclic import

Import of module [psyneulink.core.components.ports.modulatorysignals.learningsignal](1) begins an import cycle.
def _get_acts_in_and_out(input_source, output_soruce):
def _get_covariate_info(output_source, learned_projection)->(list[InputPort]):
"""Get the templates and Projections from potential covariates"""
def _non_additive_comb_fct(function, allow)->Union[bool, None]:

Check notice

Code scanning / CodeQL

Explicit returns mixed with implicit (fall through) returns

Mixing implicit and explicit returns may indicate an error as implicit returns always return None.
loggable=False,
read_only=True,
structural=True)
def _parse_covariates_sources(self, covariates_sources):

Check notice

Code scanning / CodeQL

Explicit returns mixed with implicit (fall through) returns

Mixing implicit and explicit returns may indicate an error as implicit returns always return None.
if covariates_sources:
return convert_to_list(covariates_sources)

def _parse_error_sources(self, error_sources):

Check notice

Code scanning / CodeQL

Explicit returns mixed with implicit (fall through) returns

Mixing implicit and explicit returns may indicate an error as implicit returns always return None.
Comment on lines +1304 to +1305
# if error_sources:
# self.parameters.input_ports._set(self.input_ports[:2] + [ERROR_SIGNAL] * len(error_sources),context)

Check notice

Code scanning / CodeQL

Commented-out code

This comment appears to contain commented-out code.
@@ -541,8 +574,9 @@
from psyneulink.core.components.mechanisms.mechanism import Mechanism_Base, MechanismError
from psyneulink.core.components.mechanisms.modulatory.modulatorymechanism import ModulatoryMechanism_Base
from psyneulink.core.components.mechanisms.processing.objectivemechanism import ObjectiveMechanism
from psyneulink.core.components.ports.modulatorysignals.learningsignal import LearningSignal
from psyneulink.core.components.ports.inputport import InputPort

Check notice

Code scanning / CodeQL

Cyclic import

Import of module [psyneulink.core.components.ports.inputport](1) begins an import cycle.
@@ -698,7 +698,7 @@
VARIABLE: self.variable[i],
PROJECTIONS: field}
for i, field in enumerate(self.fields)]
return super()._instantiate_input_ports(input_ports=input_ports, context=context)
return super(LearningMechanism,self)._instantiate_input_ports(input_ports=input_ports, context=context)

Check failure

Code scanning / CodeQL

First argument to super() is not enclosing class

First argument to super() should be EMStorageMechanism.
jdcpni added 2 commits August 8, 2023 20:24
fix Type for 3.8
@github-actions
Copy link

github-actions bot commented Aug 9, 2023

This PR causes the following changes to the html docs (ubuntu-latest-3.7-x64):

diff -r docs-base/CombinationFunctions.html docs-head/CombinationFunctions.html
1098c1098,1099
< <dd class="field-odd"><p><strong>input</strong> (<em>1d</em><em> or </em><em>2d np.array : default class_defaults.variable</em>) – value of the input to the Linear transform at which derivative is to be taken.
---
> <dd class="field-odd"><ul class="simple">
> <li><p><strong>output</strong> (<em>1d np.array : default class_defaults.variable</em><em>[</em><em>0</em><em>]</em>) – <p>value of the input to the Linear transform at which derivative is to be taken.
1099a1101,1107
> <div class="technical-note docutils container">
> <p>output arg is used for consistency with other derivatives used by BackPropagation, and is ignored.</p>
> </div>
> </p></li>
> <li><p><strong>covariates</strong> (<em>2d np.array : default class_defaults.variable</em><em>[</em><em>1:</em><em>]</em>) – the input(s) to the LinearCombination function other than the one for which the derivative is being
> computed;  these are used to calculate the Jacobian of the LinearCombination function.</p></li>
> </ul>
diff -r docs-base/LearningFunctions.html docs-head/LearningFunctions.html
218a219,225
> <div class="technical-note docutils container">
> <p>The <code class="docutils literal notranslate"><span class="pre">_function</span></code> method of a LearningFunction <em>must</em> include a <strong>kwargs argument, which accomodates
> Function-specific parameters;  this is to accommodate the ability of LearningMechanisms to accomodate
> all LearningFunctions, by calling their ``_function`` method with arguments that may not be implemented
> for all LearningFunctions. Such arguments placed in the **params</strong> argument of the <code class="docutils literal notranslate"><span class="pre">_function</span></code> method
> of a LearningFunction by Component._execute, and passed to the LearningFunction’s <code class="docutils literal notranslate"><span class="pre">_function</span></code> method.</p>
> </div>
1335c1342
< <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.functions.learningfunctions.</span></span><span class="sig-name descname"><span class="pre">BackPropagation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_variable</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">activation_derivative_fct</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">learning_rate</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">loss_spec</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">owner</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prefs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation" title="Permalink to this definition">¶</a></dt>
---
> <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.functions.learningfunctions.</span></span><span class="sig-name descname"><span class="pre">BackPropagation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_variable</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">activation_derivative_fct</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">covariates</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">learning_rate</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">loss_spec</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">owner</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prefs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation" title="Permalink to this definition">¶</a></dt>
1357c1364
< <p>The values of <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_input</span></code></a>, <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a> and  <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_signal</span></code></a> are specified as
---
> <p>The values of <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_input</span></code></a>, <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a> and <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_signal</span></code></a> are specified as
1359,1362c1366,1375
< and in calls to its <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>.  Although <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_matrix" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_matrix</span></code></a>
< is not specified in the constructor, it is required as an argument of the <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>;
< it is assumed that it’s value is determined in context at the time of execution (e.g., by a <a class="reference internal" href="LearningMechanism.html"><span class="doc">LearningMechanism</span></a>
< that uses the BackPropagation LearningFunction).</p>
---
> and in calls to its <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>.  If the activation function (i.e., the <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span>
> <span class="pre">of</span> <span class="pre">that</span> <span class="pre">generates</span> <span class="pre">`activation_output</span></code></a>) takes more than one argument that
> influence its <code class="xref any docutils literal notranslate"><span class="pre">activation_function_derivative</span></code>, then a
> template for these (exhibiting their shape) must be passed in the <strong>covariates</strong> argument of the constructor
> for the BackPropagation Function, and the values of these must be specified in the <strong>covariates</strong> argument of
> a call to its <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>, which is passed in the <strong>params</strong> argument of to the
> _function method.</p>
> <p>Although <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_matrix" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_matrix</span></code></a> is not specified in the constructor, it must be provided
> in the <strong>error_matrix</strong> argument of a call to the <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>, which is passed in the
> <strong>params</strong> argument to the _function method.</p>
1376a1390,1392
> <li><p><strong>covariates</strong> (<em>List</em><em>[</em><em>1d array</em><em>]</em>) – specifies a template for values of arguments used by the <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_derivative_fct</span></code></a> other than <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_input</span></code></a>
> and <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a>, to compute the derivative of the activation
> function with respect to activation_output.</p></li>
1397,1398c1413,1415
< <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a>, and
< <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_signal</span></code></a>.</p>
---
> <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a>,
> <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_signal</span></code></a>, and
> <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.covariates" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.covariates"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">covariates</span></code></a>.</p>
1454a1472,1484
> <dt class="sig sig-object py" id="psyneulink.core.components.functions.learningfunctions.BackPropagation.covariates">
> <span class="sig-name descname"><span class="pre">covariates</span></span><a class="headerlink" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.covariates" title="Permalink to this definition">¶</a></dt>
> <dd><p>a template for the values of arguments used by the <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_derivative_fct</span></code></a> other than activation_input and activation_output, to compute
> the derivative of the activation function
> with respect to activation_output.</p>
> <dl class="field-list simple">
> <dt class="field-odd">Type</dt>
> <dd class="field-odd"><p>List[1d array]</p>
> </dd>
> </dl>
> </dd></dl>
> 
> <dl class="py attribute">
1599a1630,1632
> <li><p><strong>covariates</strong> (<em>List</em><em>[</em><em>1d array</em><em>]</em>) – values of arguments used by the <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_derivative_fct</span></code></a>
> other than activation_input and activation_output, to compute the derivative of the activation function
> with respect to <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a>.</p></li>
diff -r docs-base/LearningMechanism.html docs-head/LearningMechanism.html
330a331,353
> <ul id="learningmechanism-covariates">
> <li><p><em>COVARIATES</em> - one or more InputPorts that receive the value of the inputs to <code class="xref any docutils literal notranslate"><span class="pre">output_source</span> <span class="pre">(i.e.,</span> <span class="
...

See CI logs for the full diff.

@github-actions
Copy link

github-actions bot commented Aug 9, 2023

This PR causes the following changes to the html docs (ubuntu-latest-3.7-x64):

diff -r docs-base/CombinationFunctions.html docs-head/CombinationFunctions.html
1098c1098,1099
< <dd class="field-odd"><p><strong>input</strong> (<em>1d</em><em> or </em><em>2d np.array : default class_defaults.variable</em>) – value of the input to the Linear transform at which derivative is to be taken.
---
> <dd class="field-odd"><ul class="simple">
> <li><p><strong>output</strong> (<em>1d np.array : default class_defaults.variable</em><em>[</em><em>0</em><em>]</em>) – <p>value of the input to the Linear transform at which derivative is to be taken.
1099a1101,1107
> <div class="technical-note docutils container">
> <p>output arg is used for consistency with other derivatives used by BackPropagation, and is ignored.</p>
> </div>
> </p></li>
> <li><p><strong>covariates</strong> (<em>2d np.array : default class_defaults.variable</em><em>[</em><em>1:</em><em>]</em>) – the input(s) to the LinearCombination function other than the one for which the derivative is being
> computed;  these are used to calculate the Jacobian of the LinearCombination function.</p></li>
> </ul>
diff -r docs-base/LearningFunctions.html docs-head/LearningFunctions.html
218a219,225
> <div class="technical-note docutils container">
> <p>The <code class="docutils literal notranslate"><span class="pre">_function</span></code> method of a LearningFunction <em>must</em> include a <strong>kwargs argument, which accomodates
> Function-specific parameters;  this is to accommodate the ability of LearningMechanisms to accomodate
> all LearningFunctions, by calling their ``_function`` method with arguments that may not be implemented
> for all LearningFunctions. Such arguments placed in the **params</strong> argument of the <code class="docutils literal notranslate"><span class="pre">_function</span></code> method
> of a LearningFunction by Component._execute, and passed to the LearningFunction’s <code class="docutils literal notranslate"><span class="pre">_function</span></code> method.</p>
> </div>
1335c1342
< <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.functions.learningfunctions.</span></span><span class="sig-name descname"><span class="pre">BackPropagation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_variable</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">activation_derivative_fct</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">learning_rate</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">loss_spec</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">owner</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prefs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation" title="Permalink to this definition">¶</a></dt>
---
> <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.functions.learningfunctions.</span></span><span class="sig-name descname"><span class="pre">BackPropagation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_variable</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">activation_derivative_fct</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">covariates</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">learning_rate</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">loss_spec</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">owner</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prefs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation" title="Permalink to this definition">¶</a></dt>
1357c1364
< <p>The values of <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_input</span></code></a>, <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a> and  <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_signal</span></code></a> are specified as
---
> <p>The values of <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_input</span></code></a>, <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a> and <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_signal</span></code></a> are specified as
1359,1362c1366,1375
< and in calls to its <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>.  Although <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_matrix" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_matrix</span></code></a>
< is not specified in the constructor, it is required as an argument of the <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>;
< it is assumed that it’s value is determined in context at the time of execution (e.g., by a <a class="reference internal" href="LearningMechanism.html"><span class="doc">LearningMechanism</span></a>
< that uses the BackPropagation LearningFunction).</p>
---
> and in calls to its <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>.  If the activation function (i.e., the <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span>
> <span class="pre">of</span> <span class="pre">that</span> <span class="pre">generates</span> <span class="pre">`activation_output</span></code></a>) takes more than one argument that
> influence its <code class="xref any docutils literal notranslate"><span class="pre">activation_function_derivative</span></code>, then a
> template for these (exhibiting their shape) must be passed in the <strong>covariates</strong> argument of the constructor
> for the BackPropagation Function, and the values of these must be specified in the <strong>covariates</strong> argument of
> a call to its <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>, which is passed in the <strong>params</strong> argument of to the
> _function method.</p>
> <p>Although <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_matrix" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_matrix</span></code></a> is not specified in the constructor, it must be provided
> in the <strong>error_matrix</strong> argument of a call to the <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>, which is passed in the
> <strong>params</strong> argument to the _function method.</p>
1376a1390,1392
> <li><p><strong>covariates</strong> (<em>List</em><em>[</em><em>1d array</em><em>]</em>) – specifies a template for values of arguments used by the <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_derivative_fct</span></code></a> other than <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_input</span></code></a>
> and <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a>, to compute the derivative of the activation
> function with respect to activation_output.</p></li>
1397,1398c1413,1415
< <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a>, and
< <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_signal</span></code></a>.</p>
---
> <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a>,
> <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_signal</span></code></a>, and
> <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.covariates" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.covariates"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">covariates</span></code></a>.</p>
1454a1472,1484
> <dt class="sig sig-object py" id="psyneulink.core.components.functions.learningfunctions.BackPropagation.covariates">
> <span class="sig-name descname"><span class="pre">covariates</span></span><a class="headerlink" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.covariates" title="Permalink to this definition">¶</a></dt>
> <dd><p>a template for the values of arguments used by the <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_derivative_fct</span></code></a> other than activation_input and activation_output, to compute
> the derivative of the activation function
> with respect to activation_output.</p>
> <dl class="field-list simple">
> <dt class="field-odd">Type</dt>
> <dd class="field-odd"><p>List[1d array]</p>
> </dd>
> </dl>
> </dd></dl>
> 
> <dl class="py attribute">
1599a1630,1632
> <li><p><strong>covariates</strong> (<em>List</em><em>[</em><em>1d array</em><em>]</em>) – values of arguments used by the <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_derivative_fct</span></code></a>
> other than activation_input and activation_output, to compute the derivative of the activation function
> with respect to <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a>.</p></li>
diff -r docs-base/LearningMechanism.html docs-head/LearningMechanism.html
330a331,353
> <ul id="learningmechanism-covariates">
> <li><p><em>COVARIATES</em> - one or more InputPorts that receive the value of the inputs to <code class="xref any docutils literal notranslate"><span class="pre">output_source</span> <span class="pre">(i.e.,</span> <span class="
...

See CI logs for the full diff.

@github-actions
Copy link

github-actions bot commented Aug 9, 2023

This PR causes the following changes to the html docs (ubuntu-latest-3.7-x64):

diff -r docs-base/CombinationFunctions.html docs-head/CombinationFunctions.html
1098c1098,1099
< <dd class="field-odd"><p><strong>input</strong> (<em>1d</em><em> or </em><em>2d np.array : default class_defaults.variable</em>) – value of the input to the Linear transform at which derivative is to be taken.
---
> <dd class="field-odd"><ul class="simple">
> <li><p><strong>output</strong> (<em>1d np.array : default class_defaults.variable</em><em>[</em><em>0</em><em>]</em>) – <p>value of the input to the Linear transform at which derivative is to be taken.
1099a1101,1107
> <div class="technical-note docutils container">
> <p>output arg is used for consistency with other derivatives used by BackPropagation, and is ignored.</p>
> </div>
> </p></li>
> <li><p><strong>covariates</strong> (<em>2d np.array : default class_defaults.variable</em><em>[</em><em>1:</em><em>]</em>) – the input(s) to the LinearCombination function other than the one for which the derivative is being
> computed;  these are used to calculate the Jacobian of the LinearCombination function.</p></li>
> </ul>
diff -r docs-base/LearningFunctions.html docs-head/LearningFunctions.html
218a219,225
> <div class="technical-note docutils container">
> <p>The <code class="docutils literal notranslate"><span class="pre">_function</span></code> method of a LearningFunction <em>must</em> include a <strong>kwargs argument, which accomodates
> Function-specific parameters;  this is to accommodate the ability of LearningMechanisms to accomodate
> all LearningFunctions, by calling their ``_function`` method with arguments that may not be implemented
> for all LearningFunctions. Such arguments placed in the **params</strong> argument of the <code class="docutils literal notranslate"><span class="pre">_function</span></code> method
> of a LearningFunction by Component._execute, and passed to the LearningFunction’s <code class="docutils literal notranslate"><span class="pre">_function</span></code> method.</p>
> </div>
1335c1342
< <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.functions.learningfunctions.</span></span><span class="sig-name descname"><span class="pre">BackPropagation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_variable</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">activation_derivative_fct</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">learning_rate</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">loss_spec</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">owner</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prefs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation" title="Permalink to this definition">¶</a></dt>
---
> <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.functions.learningfunctions.</span></span><span class="sig-name descname"><span class="pre">BackPropagation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_variable</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">activation_derivative_fct</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">covariates</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">learning_rate</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">loss_spec</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">owner</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prefs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation" title="Permalink to this definition">¶</a></dt>
1357c1364
< <p>The values of <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_input</span></code></a>, <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a> and  <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_signal</span></code></a> are specified as
---
> <p>The values of <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_input</span></code></a>, <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a> and <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_signal</span></code></a> are specified as
1359,1362c1366,1375
< and in calls to its <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>.  Although <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_matrix" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_matrix</span></code></a>
< is not specified in the constructor, it is required as an argument of the <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>;
< it is assumed that it’s value is determined in context at the time of execution (e.g., by a <a class="reference internal" href="LearningMechanism.html"><span class="doc">LearningMechanism</span></a>
< that uses the BackPropagation LearningFunction).</p>
---
> and in calls to its <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>.  If the activation function (i.e., the <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">function</span>
> <span class="pre">of</span> <span class="pre">that</span> <span class="pre">generates</span> <span class="pre">`activation_output</span></code></a>) takes more than one argument that
> influence its <code class="xref any docutils literal notranslate"><span class="pre">activation_function_derivative</span></code>, then a
> template for these (exhibiting their shape) must be passed in the <strong>covariates</strong> argument of the constructor
> for the BackPropagation Function, and the values of these must be specified in the <strong>covariates</strong> argument of
> a call to its <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>, which is passed in the <strong>params</strong> argument of to the
> _function method.</p>
> <p>Although <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_matrix" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_matrix"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_matrix</span></code></a> is not specified in the constructor, it must be provided
> in the <strong>error_matrix</strong> argument of a call to the <code class="xref any docutils literal notranslate"><span class="pre">function</span></code>, which is passed in the
> <strong>params</strong> argument to the _function method.</p>
1376a1390,1392
> <li><p><strong>covariates</strong> (<em>List</em><em>[</em><em>1d array</em><em>]</em>) – specifies a template for values of arguments used by the <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_derivative_fct</span></code></a> other than <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_input"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_input</span></code></a>
> and <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a>, to compute the derivative of the activation
> function with respect to activation_output.</p></li>
1397,1398c1413,1415
< <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a>, and
< <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_signal</span></code></a>.</p>
---
> <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a>,
> <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.error_signal"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">error_signal</span></code></a>, and
> <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.covariates" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.covariates"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">covariates</span></code></a>.</p>
1454a1472,1484
> <dt class="sig sig-object py" id="psyneulink.core.components.functions.learningfunctions.BackPropagation.covariates">
> <span class="sig-name descname"><span class="pre">covariates</span></span><a class="headerlink" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.covariates" title="Permalink to this definition">¶</a></dt>
> <dd><p>a template for the values of arguments used by the <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_derivative_fct</span></code></a> other than activation_input and activation_output, to compute
> the derivative of the activation function
> with respect to activation_output.</p>
> <dl class="field-list simple">
> <dt class="field-odd">Type</dt>
> <dd class="field-odd"><p>List[1d array]</p>
> </dd>
> </dl>
> </dd></dl>
> 
> <dl class="py attribute">
1599a1630,1632
> <li><p><strong>covariates</strong> (<em>List</em><em>[</em><em>1d array</em><em>]</em>) – values of arguments used by the <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_derivative_fct"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_derivative_fct</span></code></a>
> other than activation_input and activation_output, to compute the derivative of the activation function
> with respect to <a class="reference internal" href="#psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output" title="psyneulink.core.components.functions.learningfunctions.BackPropagation.activation_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">activation_output</span></code></a>.</p></li>
diff -r docs-base/LearningMechanism.html docs-head/LearningMechanism.html
330a331,353
> <ul id="learningmechanism-covariates">
> <li><p><em>COVARIATES</em> - one or more InputPorts that receive the value of the inputs to <code class="xref any docutils literal notranslate"><span class="pre">output_source</span> <span class="pre">(i.e.,</span> <span class="
...

See CI logs for the full diff.

@jdcpni jdcpni merged commit 5c7a90f into devel Aug 9, 2023
@jdcpni jdcpni deleted the feat/backprop_fct_with_multi_args branch August 9, 2023 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant