from psyneulink.globals.context import ContextFlags from psyneulink.globals.keywords import EXECUTING, FUNCTION, FUNCTION_PARAMS, INITIALIZING, INTERCEPT, LEARNING, LEARNING_PROJECTION, LEARNING_SIGNAL, MATRIX, PARAMETER_STATE, PARAMETER_STATES, PROJECTION_SENDER, SLOPE from psyneulink.globals.preferences.componentpreferenceset import is_pref_set from psyneulink.globals.preferences.preferenceset import PreferenceLevel from psyneulink.globals.utilities import iscompatible, parameter_spec __all__ = [ 'DefaultTrainingMechanism', 'LearningProjection', 'LearningProjectionError', 'WT_MATRIX_RECEIVERS_DIM', 'WT_MATRIX_SENDER_DIM', ] # Params: parameter_keywords.update({LEARNING_PROJECTION, LEARNING}) projection_keywords.update({LEARNING_PROJECTION, LEARNING}) WT_MATRIX_SENDER_DIM = 0 WT_MATRIX_RECEIVERS_DIM = 1 DefaultTrainingMechanism = ObjectiveMechanism class LearningProjectionError(Exception): def __init__(self, error_value): self.error_value = error_value def __str__(self): return repr(self.error_value)
from psyneulink.components.component import parameter_keywords from psyneulink.components.functions.function import Linear from psyneulink.components.mechanisms.adaptive.control.controlmechanism import ControlMechanism from psyneulink.components.projections.modulatory.modulatoryprojection import ModulatoryProjection_Base from psyneulink.components.projections.projection import ProjectionError, Projection_Base, projection_keywords from psyneulink.components.shellclasses import Mechanism, Process_Base from psyneulink.globals.context import ContextFlags from psyneulink.globals.keywords import CONTROL, CONTROL_PROJECTION, CONTROL_SIGNAL, PARAMETER_STATE, PROJECTION_SENDER from psyneulink.globals.preferences.componentpreferenceset import is_pref_set from psyneulink.globals.preferences.preferenceset import PreferenceLevel __all__ = [ 'CONTROL_SIGNAL_PARAMS', 'ControlProjection', 'ControlProjectionError', ] parameter_keywords.update({CONTROL_PROJECTION, CONTROL}) projection_keywords.update({CONTROL_PROJECTION, CONTROL}) CONTROL_SIGNAL_PARAMS = 'control_signal_params' class ControlProjectionError(Exception): def __init__(self, error_value): self.error_value = error_value def __str__(self): return repr(self.error_value) class ControlProjection(ModulatoryProjection_Base): """ ControlProjection( \ sender=None, \
from psyneulink.components.projections.projection import projection_keywords from psyneulink.components.shellclasses import Mechanism from psyneulink.components.states.outputstate import OutputState from psyneulink.globals.context import ContextFlags from psyneulink.globals.keywords import AUTO_ASSOCIATIVE_PROJECTION, DEFAULT_MATRIX, HOLLOW_MATRIX, MATRIX from psyneulink.globals.preferences.componentpreferenceset import is_pref_set from psyneulink.globals.preferences.preferenceset import PreferenceLevel __all__ = [ 'AutoAssociativeError', 'AutoAssociativeProjection', 'get_auto_matrix', 'get_hetero_matrix', ] parameter_keywords.update({AUTO_ASSOCIATIVE_PROJECTION}) projection_keywords.update({AUTO_ASSOCIATIVE_PROJECTION}) class AutoAssociativeError(Exception): def __init__(self, error_value): self.error_value = error_value class AutoAssociativeProjection(MappingProjection): """ AutoAssociativeProjection( \ owner=None, \ sender=None, \ receiver=None, \ matrix=DEFAULT_MATRIX, \
from psyneulink.components.component import parameter_keywords from psyneulink.components.functions.function import AccumulatorIntegrator, LinearMatrix, get_matrix from psyneulink.components.projections.pathway.pathwayprojection import PathwayProjection_Base from psyneulink.components.projections.projection import ProjectionError, Projection_Base, projection_keywords from psyneulink.components.states.outputstate import OutputState from psyneulink.globals.keywords import AUTO_ASSIGN_MATRIX, DEFAULT_MATRIX, FULL_CONNECTIVITY_MATRIX, FUNCTION, FUNCTION_PARAMS, HOLLOW_MATRIX, IDENTITY_MATRIX, INPUT_STATE, LEARNING, LEARNING_PROJECTION, MAPPING_PROJECTION, MATRIX, OUTPUT_STATE, PROCESS_INPUT_STATE, PROJECTION_SENDER, SYSTEM_INPUT_STATE, VALUE from psyneulink.globals.log import ContextFlags from psyneulink.globals.preferences.componentpreferenceset import is_pref_set from psyneulink.globals.preferences.preferenceset import PreferenceEntry, PreferenceLevel __all__ = [ 'MappingError', 'MappingProjection', ] parameter_keywords.update({MAPPING_PROJECTION}) projection_keywords.update({MAPPING_PROJECTION}) class MappingError(Exception): def __init__(self, error_value): self.error_value = error_value class MappingProjection(PathwayProjection_Base): """ MappingProjection( \ sender=None, \ receiver=None, \ matrix=DEFAULT_MATRIX, \ weight=None, \
from psyneulink.components.mechanisms.adaptive.gating.gatingmechanism import GatingMechanism from psyneulink.components.projections.modulatory.modulatoryprojection import ModulatoryProjection_Base from psyneulink.components.projections.projection import ProjectionError, Projection_Base, projection_keywords from psyneulink.components.shellclasses import Mechanism, Process_Base from psyneulink.globals.context import ContextFlags from psyneulink.globals.keywords import FUNCTION_OUTPUT_TYPE, GATING, GATING_MECHANISM, GATING_PROJECTION, GATING_SIGNAL, INPUT_STATE, OUTPUT_STATE, PROJECTION_SENDER from psyneulink.globals.preferences.componentpreferenceset import is_pref_set from psyneulink.globals.preferences.preferenceset import PreferenceLevel __all__ = [ 'GATING_SIGNAL_PARAMS', 'GatingProjection', 'GatingProjectionError', ] parameter_keywords.update({GATING_PROJECTION, GATING}) projection_keywords.update({GATING_PROJECTION, GATING}) GATING_SIGNAL_PARAMS = 'gating_signal_params' class GatingProjectionError(Exception): def __init__(self, error_value): self.error_value = error_value def __str__(self): return repr(self.error_value) class GatingProjection(ModulatoryProjection_Base): """ GatingProjection( \