Пример #1
0
 def look_at(self, stimuli, number_of_trials=1):
     layer_regions = {}
     for region in self.recorded_regions:
         layers = self.region_layer_map[region]
         layers = make_list(layers)
         for layer in layers:
             assert layer not in layer_regions, f"layer {layer} has already been assigned for {layer_regions[layer]}"
             layer_regions[layer] = region
     activations = self.run_activations(stimuli, layers=list(layer_regions.keys()), number_of_trials=number_of_trials)
     activations['region'] = 'neuroid', [layer_regions[layer] for layer in activations['layer'].values]
     return activations
Пример #2
0
 def __init__(self, identifier, activations_model, layer):
     """
     :param identifier: a string to identify the model
     :param activations_model: the model from which to retrieve representations for stimuli
     :param layer: the single behavioral readout layer or a list of layers to read out of.
     """
     self.identifier = identifier
     self.activations_model = activations_model
     self.readout = make_list(layer)
     self.classifier = ProbabilitiesMapping.ProbabilitiesClassifier()
     self.current_task = None