narla.rewards
ActiveNeurons
- class narla.rewards.ActiveNeurons[source]
Bases:
narla.rewards.biological_reward.BiologicalReward
Rewards Neurons for becoming active
- compute(network, layer_index)[source]
Compute the reward for the specified Layer
- Parameters
network (
MultiAgentNetwork
) – Networklayer_index (
int
) – Index of the Layer to computer rewards for
- Return type
Tensor
BiologicalReward
- class narla.rewards.BiologicalReward[source]
Bases:
narla.rewards.reward.Reward
BiologicalRewards are based on activity and dynamics within the Network
- abstract compute(network, layer_index)[source]
Compute the reward for the specified Layer
- Parameters
network (
MultiAgentNetwork
) – Networklayer_index (
int
) – Index of the Layer to computer rewards for
- Return type
Tensor
LayerSparsity
- class narla.rewards.LayerSparsity(desired_sparsity=0.2)[source]
Bases:
narla.rewards.biological_reward.BiologicalReward
Rewards Neurons in the layer for appropriate sparsity
- compute(network, layer_index)[source]
Compute the reward for the specified Layer
- Parameters
network (
MultiAgentNetwork
) – Networklayer_index (
int
) – Index of the Layer to computer rewards for
- Return type
Tensor
Reward
RewardTypes
- class narla.rewards.RewardTypes(value)[source]
Bases:
str
,enum.Enum
An enumeration.
- ACTIVE_NEURONS = 'active_neurons'
- ACTIVITY_TRACE = 'activity_trace'
- LAYER_SPARSITY = 'layer_sparsity'
- PREDICTION = 'prediction'
- TASK_REWARD = 'task_reward'
- static biological_reward_types()[source]
Get the RewardTypes that are biological
- Return type
List
[RewardTypes
]