Skip to content
Snippets Groups Projects
Unverified Commit 355d9404 authored by Sacha van Albada's avatar Sacha van Albada Committed by GitHub
Browse files

Merge pull request #75 from shimoura/improve_notebook_tutorial

Improve notebook tutorial
parents a4c704fc 4809b7a3
Branches master
No related tags found
No related merge requests found
Pipeline #63227 failed with stage
in 9 minutes and 21 seconds
...@@ -185,6 +185,6 @@ def visualize_fc(M, data_path): ...@@ -185,6 +185,6 @@ def visualize_fc(M, data_path):
area_string += ' ' area_string += ' '
area_string += area area_string += area
pl.text(0.00, 0.15, r'Order of cortical areas:', transform=fig.transFigure, fontsize=13, fontweight='bold') pl.text(0.00, 0.15, r'Order of cortical areas from top to bottom and left to right:', transform=fig.transFigure, fontsize=13, fontweight='bold')
pl.text(0.00, 0.1, area_string, pl.text(0.00, 0.1, area_string,
transform=fig.transFigure, fontsize=11) transform=fig.transFigure, fontsize=11)
...@@ -12,7 +12,7 @@ from multiarea_model import MultiAreaModel ...@@ -12,7 +12,7 @@ from multiarea_model import MultiAreaModel
def visualize_interareal_connectivity(M): def visualize_interareal_connectivity(M):
""" """
Visualize inter-area connectivity for a comparison of the full-scale model and the down-scaled model Visualize inter-area connectivity for a comparison of the full-scale model and the downscaled model
Parameters: Parameters:
- M ((MultiAreaModel)): Object containing simulation data. - M ((MultiAreaModel)): Object containing simulation data.
...@@ -35,7 +35,7 @@ def visualize_interareal_connectivity(M): ...@@ -35,7 +35,7 @@ def visualize_interareal_connectivity(M):
pl.rcParams['figure.figsize'] = (width, height) pl.rcParams['figure.figsize'] = (width, height)
fig = pl.figure() fig = pl.figure()
fig.suptitle('Area-level connectivity of the full-scale and down-scaled MAM expressed as relative indegrees for each target area', fontsize=15, x=0.5, y=1.05) fig.suptitle('Area-level connectivity of the full-scale and downscaled MAM expressed as relative indegrees for each target area', fontsize=15, x=0.5, y=1.05)
axes = {} axes = {}
gs1 = gridspec.GridSpec(1, 2) gs1 = gridspec.GridSpec(1, 2)
...@@ -47,7 +47,7 @@ def visualize_interareal_connectivity(M): ...@@ -47,7 +47,7 @@ def visualize_interareal_connectivity(M):
pos2 = axes['D'].get_position() pos2 = axes['D'].get_position()
labels = ['B', 'D'] labels = ['B', 'D']
labels_display = ['Full-scale model', 'Down-scaled model'] labels_display = ['Full-scale model', 'Downscaled model']
for i in range(len(labels)): for i in range(len(labels)):
label = labels[i] label = labels[i]
label_display = labels_display[i] label_display = labels_display[i]
...@@ -100,7 +100,7 @@ def visualize_interareal_connectivity(M): ...@@ -100,7 +100,7 @@ def visualize_interareal_connectivity(M):
cbar.set_alpha(0.) cbar.set_alpha(0.)
""" """
Panel D: Interareal connectivity of down-scaling multi-area model Panel D: Interareal connectivity of downscaling multi-area model
""" """
conn_matrix_down_scale = np.zeros((32, 32)) conn_matrix_down_scale = np.zeros((32, 32))
for i, area1 in enumerate(area_list[::-1]): for i, area1 in enumerate(area_list[::-1]):
......
%% Cell type:markdown id:b1331599 tags: %% Cell type:markdown id:b1331599 tags:
# Down-scaled multi-area model # Downscaled multi-area model
%% Cell type:markdown id:edec8345-aec1-419e-b9e3-7f612aff8262 tags: %% Cell type:markdown id:edec8345-aec1-419e-b9e3-7f612aff8262 tags:
<img src="model_construction.png" alt="Model overview" width="1000"/> <img src="model_construction.png" alt="Model overview" width="1000"/>
%% Cell type:markdown id:f4a649cc-3b68-49e4-b2b6-6f29f13a6d9c tags: %% Cell type:markdown id:f4a649cc-3b68-49e4-b2b6-6f29f13a6d9c tags:
The code in this notebook implements the down-scaled version of spiking network model of macaque visual cortex developed at the Institute of Neuroscience and Medicine (INM-6), Research Center Jülich. The full-scale model has been documented in the following publications: The code in this notebook implements the downscaled version of spiking network model of macaque visual cortex developed at the Institute of Neuroscience and Medicine (INM-6), Research Center Jülich. The full-scale model has been documented in the following publications:
1. Schmidt M, Bakker R, Hilgetag CC, Diesmann M & van Albada SJ 1. Schmidt M, Bakker R, Hilgetag CC, Diesmann M & van Albada SJ
Multi-scale account of the network structure of macaque visual cortex Multi-scale account of the network structure of macaque visual cortex
Brain Structure and Function (2018), 223: 1409 [https://doi.org/10.1007/s00429-017-1554-4](https://doi.org/10.1007/s00429-017-1554-4) Brain Structure and Function (2018), 223: 1409 [https://doi.org/10.1007/s00429-017-1554-4](https://doi.org/10.1007/s00429-017-1554-4)
2. Schuecker J, Schmidt M, van Albada SJ, Diesmann M & Helias M (2017) 2. Schuecker J, Schmidt M, van Albada SJ, Diesmann M & Helias M (2017)
Fundamental Activity Constraints Lead to Specific Interpretations of the Connectome. Fundamental Activity Constraints Lead to Specific Interpretations of the Connectome.
PLOS Computational Biology, 13(2): e1005179. [https://doi.org/10.1371/journal.pcbi.1005179](https://doi.org/10.1371/journal.pcbi.1005179) PLOS Computational Biology, 13(2): e1005179. [https://doi.org/10.1371/journal.pcbi.1005179](https://doi.org/10.1371/journal.pcbi.1005179)
3. Schmidt M, Bakker R, Shen K, Bezgin B, Diesmann M & van Albada SJ (2018) 3. Schmidt M, Bakker R, Shen K, Bezgin B, Diesmann M & van Albada SJ (2018)
A multi-scale layer-resolved spiking network model of A multi-scale layer-resolved spiking network model of
resting-state dynamics in macaque cortex. PLOS Computational Biology, 14(9): e1006359. [https://doi.org/10.1371/journal.pcbi.1006359](https://doi.org/10.1371/journal.pcbi.1006359) resting-state dynamics in macaque cortex. PLOS Computational Biology, 14(9): e1006359. [https://doi.org/10.1371/journal.pcbi.1006359](https://doi.org/10.1371/journal.pcbi.1006359)
%% Cell type:markdown id:b952d0ea tags: %% Cell type:markdown id:b952d0ea tags:
## Notebook Outline <a class="anchor" id="toc"></a> ## Notebook Outline <a class="anchor" id="toc"></a>
* [S0. Configuration](#section_0) * [S0. Configuration](#section_0)
* [S1. Parameterization](#section_1) * [S1. Parameterization](#section_1)
* [1.1. Parameters to tune](#section_1_1) * [1.1. Parameters to tune](#section_1_1)
* [S2. Model Configuration, Instantiation and Simulation](#section_2) * [S2. Model Configuration, Instantiation and Simulation](#section_2)
* [2.1. Configuring model parameters](#section_2_1) * [2.1. Configuring model parameters](#section_2_1)
* [2.2. Instantiate a multi-area model](#section_2_2) * [2.2. Instantiate a multi-area model](#section_2_2)
* [2.3. Predict firing rates from theory](#section_2_3) * [2.3. Predict firing rates from theory](#section_2_3)
* [2.4. Extract and visualize inter-areal connectivity](#section_2_3) * [2.4. Extract and visualize inter-areal connectivity](#section_2_3)
* [2.5. Run a simulation](#section_2_5) * [2.5. Run a simulation](#section_2_5)
* [S3. Visualization of Network Dynamics](#section_3) * [S3. Visualization of Network Dynamics](#section_3)
* [3.1. Mean firing rate over simulated populations](#section_3_1) * [3.1. Mean firing rate over simulated populations](#section_3_1)
* [3.2. Instantaneous firing rate over simulated areas](#section_3_2) * [3.2. Instantaneous firing rate over simulated areas](#section_3_2)
* [3.3. Time-averaged firing rate over all populations](#section_3_3) * [3.3. Time-averaged firing rate over all populations](#section_3_3)
* [3.4. Network dynamics](#section_3_4) * [3.4. Network dynamics](#section_3_4)
* [3.5. Functional connectivity](#section_3_5) * [3.5. Functional connectivity](#section_3_5)
* [Additional Notes](#section_4) * [Additional Notes](#section_4)
%% Cell type:markdown id:d782e527 tags: %% Cell type:markdown id:d782e527 tags:
## S0. Configuration <a class="anchor" id="section_0"></a> ## S0. Configuration <a class="anchor" id="section_0"></a>
%% Cell type:code id:9d6cc7d9-3110-4d96-9f9a-9ec7dee6d145 tags: %% Cell type:code id:9d6cc7d9-3110-4d96-9f9a-9ec7dee6d145 tags:
``` python ``` python
# Create config file # Create config file
with open('config.py', 'w') as fp: with open('config.py', 'w') as fp:
fp.write( fp.write(
'''import os '''import os
base_path = os.path.abspath(".") base_path = os.path.abspath(".")
data_path = os.path.abspath("simulations") data_path = os.path.abspath("simulations")
jobscript_template = "python {base_path}/run_simulation.py {label}" jobscript_template = "python {base_path}/run_simulation.py {label}"
submit_cmd = "bash -c" submit_cmd = "bash -c"
''') ''')
``` ```
%% Cell type:code id:96517739 tags: %% Cell type:code id:96517739 tags:
``` python ``` python
%matplotlib inline %matplotlib inline
import numpy as np import numpy as np
import sys import sys
import os import os
from IPython.display import display, HTML from IPython.display import display, HTML
import warnings import warnings
from multiarea_model import MultiAreaModel from multiarea_model import MultiAreaModel
from multiarea_model import Analysis from multiarea_model import Analysis
from config import base_path, data_path from config import base_path, data_path
sys.path.append('./figures/MAM2EBRAINS') sys.path.append('./figures/MAM2EBRAINS')
``` ```
%% Cell type:code id:06764b48-a3b0-4518-ba92-816398bb72b0 tags: %% Cell type:code id:06764b48-a3b0-4518-ba92-816398bb72b0 tags:
``` python ``` python
# Jupyter notebook display format setting # Jupyter notebook display format setting
style = """ style = """
<style> <style>
table {float:left} table {float:left}
</style> </style>
""" """
display(HTML(style)) display(HTML(style))
warnings.filterwarnings('ignore') warnings.filterwarnings('ignore')
``` ```
%% Cell type:markdown id:27160ba8 tags: %% Cell type:markdown id:27160ba8 tags:
Go back to [Notebook Outline](#toc) Go back to [Notebook Outline](#toc)
%% Cell type:markdown id:df83f5ea-1c4b-44d3-9926-01786aa46e14 tags: %% Cell type:markdown id:df83f5ea-1c4b-44d3-9926-01786aa46e14 tags:
## S1. Parameterization <a class="anchor" id="section_1"></a> ## S1. Parameterization <a class="anchor" id="section_1"></a>
%% Cell type:markdown id:30655817 tags: %% Cell type:markdown id:30655817 tags:
### 1.1. Parameters to tune <a class="anchor" id="section_1_1"></a> ### 1.1. Parameters to tune <a class="anchor" id="section_1_1"></a>
%% Cell type:markdown id:9daf88e5-0d45-4529-a228-70c33900b05e tags: %% Cell type:markdown id:9daf88e5-0d45-4529-a228-70c33900b05e tags:
The values assigned for the following parameters are kept the same as in the paper except for the `scale_down_to` which is set as 0.006 enabling to simulate a down-scaled multi-area model with 2GB RAM. By default, it is set to 1.0 for simulating the full-scale model. The values assigned for the following parameters are kept the same as in the paper except for the `scale_down_to` which is set as 0.006 enabling to simulate a downscaled multi-area model with 2GB RAM. By default, it is set to 1.0 for simulating the full-scale model.
%% Cell type:markdown id:4f67c1ba tags: %% Cell type:markdown id:4f67c1ba tags:
|Parameter |Default value|Value range/options|Value assigned|Description| |Parameter |Default value|Value range/options|Value assigned|Description|
|:---------------:|:-----------:|:-----------------:|:------------:|:---------:| |:---------------:|:-----------:|:-----------------:|:------------:|:---------:|
|scale_down_to |$1.0$ |$(0, 1.0]$ |$0.006$ |$^1$ | |scale_down_to |$1.0$ |$(0, 1.0]$ |$0.006$ |$^1$ |
|cc_weights_factor|$1.9$ |$\geq 1.0$ |$1.9$ |$^2$ | |cc_weights_factor|$1.9$ |$\geq 1.0$ |$1.9$ |$^2$ |
|areas_simulated |complete_area_list|Sublists of complete_area_list|complete_area_list|$^3$| |areas_simulated |complete_area_list|Sublists of complete_area_list|complete_area_list|$^3$|
|replace_non_simulated_areas|None|None, 'hom_poisson_stat', 'het_poisson_stat', 'het_current_nonstat'|'het_poisson_stat'|$^4$ | |replace_non_simulated_areas|None|None, 'hom_poisson_stat', 'het_poisson_stat', 'het_current_nonstat'|'het_poisson_stat'|$^4$ |
|g |$-11.0$|$\leq -1.0$ |$-11.0$ |$^5$ | |g |$-11.0$|$\leq -1.0$ |$-11.0$ |$^5$ |
|rate_ext |$10.0$ |$\geq 0.0$ |$10.0$ |$^6$ | |rate_ext |$10.0$ |$\geq 0.0$ |$10.0$ |$^6$ |
%% Cell type:markdown id:a2161477 tags: %% Cell type:markdown id:a2161477 tags:
1. `scale_down_to` is the down-scaling factor that defines the ratio by which the full-scale multi-area model is reduced to a model with fewer neurons and indegrees. This reduction is essential to enable simulation on machines with limited computational power, ensuring that simulation results can be obtained in a relatively shorter timeframe. <br> If the value is `scale_down_to = 1.`, the full-scale network will be simulated. <br> In the pre-set down-scaled version, `scale_down_to = 0.006`. This setting reduces the number of neurons and indegrees to 0.6 % of their full-scale counterparts, facilitating simulation on a typical local machine. <br> **Warning**: This may not yield reasonable results from the network dynamics and is only meant to demonstrate the simulation workflow! <br> 1. `scale_down_to` is the downscaling factor that defines the ratio by which the full-scale multi-area model is reduced to a model with fewer neurons and indegrees. This reduction is essential to enable simulation on machines with limited computational power, ensuring that simulation results can be obtained in a relatively shorter timeframe. <br> If the value is `scale_down_to = 1.`, the full-scale network will be simulated. <br> In the pre-set downscaled version, `scale_down_to = 0.006`. This setting reduces the number of neurons and indegrees to 0.6 % of their full-scale counterparts, facilitating simulation on a typical local machine. <br> **Warning**: This may not yield reasonable results for the network dynamics and is only meant to demonstrate the simulation workflow! <br>
2. `cc_weights_factor` is the scaling factor that controls the cortico-cortical synaptic strength. <br> By default it is set to `1.9`, keeping the same value for producing the metastable state as in the original paper. <br> **Important**: This factor plays a crucial role in transitioning the network activity from the ground to the metastable state. In the full-scale network, the ground state and metastable state activities are achieved when this parameter is set to `1.0` and `1.9`, respectively. In the down-scaled multi-area model, a similar metastable state may not be achieved or achieved with a different value. <br> 2. `cc_weights_factor` is the scaling factor that controls the cortico-cortical synaptic strength. <br> By default it is set to `1.9`, keeping the same value for producing the metastable state as in the original paper. <br> **Important**: This factor plays a crucial role in transitioning the network activity from the ground to the metastable state. In the full-scale network, the ground state and metastable state activities are achieved when this parameter is set to `1.0` and `1.9`, respectively. In the downscaled multi-area model, a similar metastable state may not be achieved or achieved with a different value. <br>
3. `areas_simulated` specifies the cortical areas to be included in the simulation process. Its default value is `complete_area_list` meaning all the areas in the complete_area_list will be simulated. 3. `areas_simulated` specifies the cortical areas to be included in the simulation process. Its default value is `complete_area_list` meaning all the areas in the complete_area_list will be simulated.
```python ```python
complete_area_list = ['V1', 'V2', 'VP', 'V3', 'V3A', 'MT', 'V4t', 'V4', 'VOT', 'MSTd', 'PIP', 'PO', 'DP', 'MIP', 'MDP', 'VIP', 'LIP', 'PITv', 'PITd', 'MSTl', 'CITv', 'CITd', 'FEF', 'TF', 'AITv', 'FST', '7a', 'STPp', 'STPa', '46', 'AITd', 'TH'] complete_area_list = ['V1', 'V2', 'VP', 'V3', 'V3A', 'MT', 'V4t', 'V4', 'VOT', 'MSTd', 'PIP', 'PO', 'DP', 'MIP', 'MDP', 'VIP', 'LIP', 'PITv', 'PITd', 'MSTl', 'CITv', 'CITd', 'FEF', 'TF', 'AITv', 'FST', '7a', 'STPp', 'STPa', '46', 'AITd', 'TH']
``` ```
The value assigned to `areas_simulated` can be any sublist of complete_area_list. The value assigned to `areas_simulated` can be any sublist of complete_area_list.
4. `replace_non_simulated_areas` defines how non-simulated areas will be replaced. <br> When all areas are included, it is set as `None` by default. <br> Other options are: `'hom_poisson_stat'`, `'het_poisson_stat'`, and `'het_current_nonstat'`.<br> `'hom_poisson_stat'` replaces the non-simulated areas by Poisson sources with the same global rate `rate_ext`. The `'het_poisson_stat'` and `'het_current_nonstat'` options use the loaded specific rates from `'replace_cc_input_source'`, which contains the area-specific firing rates of our full-scale simulation results. The difference is that `'het_poisson_stat'` replaces the non-simulated areas by Poisson spike trains and `'het_current_nonstat'` replaces it with a time-varying current input. 4. `replace_non_simulated_areas` defines how non-simulated areas will be replaced. <br> When all areas are included, it is set as `None` by default. <br> Other options are: `'hom_poisson_stat'`, `'het_poisson_stat'`, and `'het_current_nonstat'`.<br> `'hom_poisson_stat'` replaces the non-simulated areas by Poisson sources with the same global rate `rate_ext`. The `'het_poisson_stat'` and `'het_current_nonstat'` options use the loaded specific rates from `'replace_cc_input_source'`, which contains the area-specific firing rates of our full-scale simulation results. The difference is that `'het_poisson_stat'` replaces the non-simulated areas by Poisson spike trains and `'het_current_nonstat'` replaces them with a time-varying current input.
5. `g` defines the relative inhibitory synaptic strength (in relative units to the excitatory synaptic strength). By default: `-11.0`, as used in the full-scale network. `g = -1.0` means equal excitatory and inhibitory strengths, and `g < -1.0` results in stronger inhibition than excitation. 5. `g` defines the relative inhibitory synaptic strength (in relative units to the excitatory synaptic strength). By default: `-11.0`, as used in the full-scale network. `g = -1.0` means equal excitatory and inhibitory strengths, and `g < -1.0` results in stronger inhibition than excitation.
6. `rate_ext` defines the rate of the Poissonian spike generator (in spikes/s), by default: `10.0`. It also serves as one of the input parameters of the model. When a larger value is assigned to `rate_ext`, the excitatory background noise is increased. Note that the external Poisson indegree onto 5E and 6E is increased by a factor of 1.125 and 1.41666667 respectively, and the external Poisson indegree onto 23E and 5E in area TH is increased by a factor of 1.2. 6. `rate_ext` defines the rate of the Poissonian spike generator (in spikes/s), by default: `10.0`. It also serves as one of the input parameters of the model. When a larger value is assigned to `rate_ext`, the excitatory background noise is increased. Note that the external Poisson indegree onto 5E and 6E is increased by a factor of 1.125 and 1.41666667 respectively, and the external Poisson indegree onto 23E and 5E in area TH is increased by a factor of 1.2.
%% Cell type:code id:60265d52 tags: %% Cell type:code id:60265d52 tags:
``` python ``` python
# Downscaling factor # Downscaling factor
# value range/options: (0, 1.], change it to 1. to simulate the full-scale network # value range/options: (0, 1.], change it to 1. to simulate the full-scale network
scale_down_to = 0.006 scale_down_to = 0.006
# Scaling factor for cortico-cortical connections (Chi) # Scaling factor for cortico-cortical connections (Chi)
# value range/options: [1., 2.5], # value range/options: [1., 2.5],
# a weight factor of 1.0 produces Ground state activity. # a weight factor of 1.0 produces Ground state activity.
# 1.9 was assigned to produce results in Schmidt et al. (2018). # 1.9 was assigned to produce the metastable results in Schmidt et al. (2018).
cc_weights_factor = 1.9 cc_weights_factor = 1.9
# Cortical areas included in the simulation # Cortical areas included in the simulation
# value range/options: any sublist of complete_area_list # value range/options: any sublist of complete_area_list
# where complete_area_list is # where complete_area_list is
complete_area_list = ['V1', 'V2', 'VP', 'V3', 'V3A', 'MT', 'V4t', 'V4', 'VOT', 'MSTd', complete_area_list = ['V1', 'V2', 'VP', 'V3', 'V3A', 'MT', 'V4t', 'V4', 'VOT', 'MSTd',
'PIP', 'PO', 'DP', 'MIP', 'MDP', 'VIP', 'LIP', 'PITv', 'PITd', 'PIP', 'PO', 'DP', 'MIP', 'MDP', 'VIP', 'LIP', 'PITv', 'PITd',
'MSTl', 'CITv', 'CITd', 'FEF', 'TF', 'AITv', 'FST', '7a', 'STPp', 'MSTl', 'CITv', 'CITd', 'FEF', 'TF', 'AITv', 'FST', '7a', 'STPp',
'STPa', '46', 'AITd', 'TH'] 'STPa', '46', 'AITd', 'TH']
areas_simulated = complete_area_list areas_simulated = complete_area_list
# areas_simulated = ['V1', 'V2'] # areas_simulated = ['V1', 'V2']
# Firing rates used to replace the non-simulated areas # Firing rates used to replace the non-simulated areas
# value range/options: None, 'hom_poisson_stat', 'het_poisson_stat', 'het_current_nonstat' # value range/options: None, 'hom_poisson_stat', 'het_poisson_stat', 'het_current_nonstat'
# if areas_simulated is complete_area_list, then replace_non_simulated_areas will be set as None # if areas_simulated is complete_area_list, then replace_non_simulated_areas will be set as None
# regardless of the value assigned below # regardless of the value assigned below
replace_non_simulated_areas = 'het_poisson_stat' replace_non_simulated_areas = 'het_poisson_stat'
# Relative inhibitory synaptic strength (in relative units), by default: -11. # Relative inhibitory synaptic strength (in relative units), by default: -11.
g = -11. g = -11.
# Rate of the Poissonian spike generator (in spikes/s), by default: 10. # Rate of the Poissonian spike generator (in spikes/s), by default: 10.
rate_ext = 10. rate_ext = 10.
``` ```
%% Cell type:markdown id:1472e9c5 tags: %% Cell type:markdown id:1472e9c5 tags:
Go back to [Notebook Outline](#toc) Go back to [Notebook Outline](#toc)
%% Cell type:markdown id:de4a6703 tags: %% Cell type:markdown id:de4a6703 tags:
## S2. Model Configuration, Instantiation and Simulation <a class="anchor" id="section_2"></a> ## S2. Model Configuration, Instantiation and Simulation <a class="anchor" id="section_2"></a>
%% Cell type:markdown id:9608b6d9-c7e4-4b2d-9c2b-0d43c6415b48 tags: %% Cell type:markdown id:9608b6d9-c7e4-4b2d-9c2b-0d43c6415b48 tags:
### 2.1. Configuring model parameters <a class="anchor" id="section_2_1"></a> ### 2.1. Configuring model parameters <a class="anchor" id="section_2_1"></a>
%% Cell type:markdown id:56e2b6f6-d67a-4a74-973b-c8507a975bf8 tags: %% Cell type:markdown id:56e2b6f6-d67a-4a74-973b-c8507a975bf8 tags:
We try our best not to confuse users with too many parameters. So, the few parameters tunned will be automatically assigned in this section to properly run the simulation. The cell below assigns the parameters defined in the previous section. If you want to explore the model, you can alter network or simulation configuration parameters in the `network_params` and `sim_params` dictionaries below.
However, if you want to explore the model, you can alter other parameters related to the network or simulation configuration by passing them in the `network_params` and `sim_params` dictionaries below. If this is not the case, you can execute the cell the way it is.
%% Cell type:code id:fc49ba27-cb8e-441a-bf34-432971555b90 tags: %% Cell type:code id:fc49ba27-cb8e-441a-bf34-432971555b90 tags:
``` python ``` python
# Determine replace_cc_input_source # Determine replace_cc_input_source
replace_cc_input_source = None # By default, replace_cc_input_source is set to None replace_cc_input_source = None # By default, replace_cc_input_source is set to None
# where areas_simulated is complete_area_list # where areas_simulated is complete_area_list
if set(areas_simulated) != set(complete_area_list): if set(areas_simulated) != set(complete_area_list):
if replace_non_simulated_areas == 'hom_poisson_stat': if replace_non_simulated_areas == 'hom_poisson_stat':
replace_cc_input_source = None replace_cc_input_source = None
elif replace_non_simulated_areas == 'het_poisson_stat' or replace_non_simulated_areas == 'het_current_nonstat': elif replace_non_simulated_areas == 'het_poisson_stat' or replace_non_simulated_areas == 'het_current_nonstat':
replace_cc_input_source = os.path.join(base_path, 'tests/fullscale_rates.json') replace_cc_input_source = os.path.join(base_path, 'tests/fullscale_rates.json')
else: else:
raise Exception("'hom_poisson_stat', 'het_poisson_stat', or 'het_current_nonstat' should be assigned to replace_non_simulated_areas when not all areas are simulated!") raise Exception("'hom_poisson_stat', 'het_poisson_stat', or 'het_current_nonstat' should be assigned to replace_non_simulated_areas when not all areas are simulated!")
# Determine cc_weights_I_factor from cc_weights_factor # Determine cc_weights_I_factor from cc_weights_factor
# This additional factor scales the cortico-cortical weights targeting inhibitory populations.
# In this case, the cc_weights_factor is multiplied by the cc_weights_I_factor.
# For example:
# - If cc_weights_I_factor is 1.0, cortico-cortical connections have the same synaptic weight
# for both excitatory and inhibitory targets.
# - If cc_weights_I_factor > 1.0, cortico-cortical connections targeting inhibitory neurons are stronger.
# The conditions below are based on the results in Schmidt et al. (2018).
if cc_weights_factor == 1.0: # For ground state with cc_weights_factor as 1., if cc_weights_factor == 1.0: # For ground state with cc_weights_factor as 1.,
cc_weights_I_factor = 1.0 # cc_weights_I_factor is set to 1. cc_weights_I_factor = 1.0 # cc_weights_I_factor is set to 1.
elif cc_weights_factor > 1.0: # For cc_weights_factor larger than 1.0, elif cc_weights_factor > 1.0: # For cc_weights_factor larger than 1.0,
cc_weights_I_factor = 2.0 # cc_weights_I_factor is set to 2. cc_weights_I_factor = 2.0 # cc_weights_I_factor is set to 2.
else: # cc_weights_factor outside of (1., 2.5], raise error else: # cc_weights_factor outside of (1., 2.5], raise error
raise Exception("A value that is equal to or larger than 1.0 should be assigned to the parameter cc_weights_factor!") raise Exception("A value that is equal to or larger than 1.0 should be assigned to the parameter cc_weights_factor!")
# Connection parameters # Connection parameters
conn_params = { conn_params = {
'replace_non_simulated_areas': replace_non_simulated_areas, # Whether to replace non-simulated areas by Poisson sources 'replace_non_simulated_areas': replace_non_simulated_areas, # Whether to replace non-simulated areas by Poisson sources
'g': g, # It sets the relative inhibitory synaptic strength, by default: -11. 'g': g, # It sets the relative inhibitory synaptic strength, by default: -11.
'replace_cc_input_source': replace_cc_input_source, # Specify the data used to replace non-simulated areas 'replace_cc_input_source': replace_cc_input_source, # Specify the data used to replace non-simulated areas
'cc_weights_factor': cc_weights_factor, 'cc_weights_factor': cc_weights_factor,
'cc_weights_I_factor': cc_weights_I_factor 'cc_weights_I_factor': cc_weights_I_factor
} }
# Input parameters # Input parameters
input_params = { input_params = {
'rate_ext': rate_ext # Rate of the Poissonian spike generator (in spikes/s), by default: 10. 'rate_ext': rate_ext # Rate of the Poissonian spike generator (in spikes/s), by default: 10.
} }
# Network parameters # Network parameters
network_params = { network_params = {
'N_scaling': scale_down_to, # Scaling of population sizes, by default: 1. for full scale multi-area model 'N_scaling': scale_down_to, # Scaling of population sizes, by default: 1. for full scale multi-area model
'K_scaling': scale_down_to, # Scaling of indegrees, by default: 1. for full scale multi-area model 'K_scaling': scale_down_to, # Scaling of indegrees, by default: 1. for full scale multi-area model
'fullscale_rates': os.path.join(base_path, 'tests/fullscale_rates.json'), # Absolute path to the file holding full-scale rates for scaling synaptic weights, by default: None 'fullscale_rates': os.path.join(base_path, 'tests/fullscale_rates.json'), # Absolute path to the file holding full-scale rates for scaling synaptic weights, by default: None
'input_params': input_params, # Input parameters 'input_params': input_params, # Input parameters
'connection_params': conn_params, # Connection parameters 'connection_params': conn_params, # Connection parameters
} }
# Simulation parameters # Simulation parameters
sim_params = { sim_params = {
'areas_simulated': areas_simulated, # Cortical areas included in the simulation 'areas_simulated': areas_simulated, # Cortical areas included in the simulation
't_sim': 2000., # Simulated time (in ms), by default: 10. 't_sim': 2000., # Simulated time (in ms), by default: 10.
'rng_seed': 1 # Global random seed 'rng_seed': 1 # Global random seed
} }
``` ```
%% Cell type:markdown id:b3b5f634-284d-4b7b-88f6-17d26fb7743c tags: %% Cell type:markdown id:b3b5f634-284d-4b7b-88f6-17d26fb7743c tags:
Go back to [Notebook Outline](#toc) Go back to [Notebook Outline](#toc)
%% Cell type:markdown id:1fd58841 tags: %% Cell type:markdown id:1fd58841 tags:
### 2.2. Instantiate a multi-area model <a class="anchor" id="section_2_2"></a> ### 2.2. Instantiate a multi-area model <a class="anchor" id="section_2_2"></a>
%% Cell type:code id:ab25f9f8 tags: %% Cell type:code id:ab25f9f8 tags:
``` python ``` python
M = MultiAreaModel(network_params, M = MultiAreaModel(network_params,
simulation=True, simulation=True,
sim_spec=sim_params, sim_spec=sim_params,
theory=True) theory=True)
``` ```
%% Cell type:markdown id:91649c30 tags:
### 2.3. Predict firing rates from theory <a class="anchor" id="section_2_3"></a>
%% Cell type:markdown id:07cc84bf-dbcf-4ac3-b76e-ebe0886b4012 tags:
Note: the prediction may differ from the simulation results, especially in the presence of synchrony.
%% Cell type:code id:6a7ddf0e tags:
``` python
p, r = M.theory.integrate_siegert()
print("Mean-field theory predicts an average "
"firing rate of {0:.3f} spikes/s across all populations.".format(np.mean(r[:, -1])))
```
%% Cell type:markdown id:c361fa92-4f50-4519-9592-60a39888a12b tags: %% Cell type:markdown id:c361fa92-4f50-4519-9592-60a39888a12b tags:
Go back to [Notebook Outline](#toc) Go back to [Notebook Outline](#toc)
%% Cell type:markdown id:2062ddf3 tags: %% Cell type:markdown id:2062ddf3 tags:
### 2.4. Extract and visualize inter-areal connectivity <a class="anchor" id="section_2_4"></a> ### 2.3. Extract and visualize inter-areal connectivity <a class="anchor" id="section_2_4"></a>
%% Cell type:markdown id:8a7c09e0 tags: %% Cell type:markdown id:8a7c09e0 tags:
The connectivity and neuron numbers are stored in the attributes of the model class. The connectivity and neuron numbers are stored in the attributes of the model class.
- Neuron numbers of all populations in each area are stored in `M.N` as a dictionary (and in `M.N_vec` as an array). - Neuron numbers of all populations in each area are stored in `M.N` as a dictionary (and in `M.N_vec` as an array).
- Indegrees are stored in `M.K` as a dictionary (and in `M.K_matrix` as an array).<br> - Indegrees are stored in `M.K` as a dictionary (and in `M.K_matrix` as an array).<br>
Dictionary of nodes indegrees organized as:<br> Dictionary of indegrees organized as:<br>
`{<target_area>: {<target_pop>: {<source_area>: {<source_pop>: indegree_values}}}}` `{<target_area>: {<target_pop>: {<source_area>: {<source_pop>: indegree_values}}}}`
- Number of synapses can be accessed via `M.synapses` (and in `M.syn_matrix` as an array). <br> - Numbers of synapses can be accessed via `M.synapses` (and in `M.syn_matrix` as an array). <br>
Dictionary of synapses that target neurons receive, it is organized as:<br> Dictionary of synapses that target neurons receive organized as:<br>
`{<target_area>: {<target_pop>: {<source_area>: {<source_pop>: number_of_synapses}}}}` `{<target_area>: {<target_pop>: {<source_area>: {<source_pop>: number_of_synapses}}}}`
%% Cell type:markdown id:6b473f0e-ceca-47e1-9563-a613574497c4 tags: %% Cell type:markdown id:6b473f0e-ceca-47e1-9563-a613574497c4 tags:
The figure below shows the inter-areal connectivity of the model expressed as the relative indegrees of each target area. The relative indegree of a target area from a specific source area is calculated by dividing its indegree by the sum of indegrees that the target area receives from all sources. The figure below shows the inter-areal connectivity of the model expressed as the relative indegrees of each target area. The relative indegree of a target area from a specific source area is calculated by dividing its indegree by the sum of indegrees that the target area receives from all sources.
The relative indegrees of the full-scale and downscaled models are the same apart from potential differences due to rounding.
%% Cell type:markdown id:5c15ee30-b5eb-4024-b127-98ab68337ec0 tags: %% Cell type:markdown id:5c15ee30-b5eb-4024-b127-98ab68337ec0 tags:
Comparable figure in our publications: <br> Comparable figure in our publications: <br>
1. Schmidt M, Bakker R, Hilgetag CC, Diesmann M & van Albada SJ <br> 1. Schmidt M, Bakker R, Hilgetag CC, Diesmann M & van Albada SJ <br>
Multi-scale account of the network structure of macaque visual cortex Multi-scale account of the network structure of macaque visual cortex
Brain Structure and Function (2018), 223: 1409 [https://doi.org/10.1007/s00429-017-1554-4](https://doi.org/10.1007/s00429-017-1554-4) <br> Brain Structure and Function (2018), 223: 1409 [https://doi.org/10.1007/s00429-017-1554-4](https://doi.org/10.1007/s00429-017-1554-4) <br>
**Fig. 4D Area-level connectivity of the model, based on data in a–c, expressed as relative indegrees for each target area.** **Fig. 4D Area-level connectivity of the model, based on data in a–c, expressed as relative indegrees for each target area.**
%% Cell type:code id:05512922-26e5-425f-90a4-0df7c2279ccf tags: %% Cell type:code id:05512922-26e5-425f-90a4-0df7c2279ccf tags:
``` python ``` python
from M2E_visualize_interareal_connectivity import visualize_interareal_connectivity from M2E_visualize_interareal_connectivity import visualize_interareal_connectivity
visualize_interareal_connectivity(M) visualize_interareal_connectivity(M)
``` ```
%% Cell type:markdown id:e67f37e9-ec8d-4bb1-bd21-45e966f47ab6 tags: %% Cell type:markdown id:e67f37e9-ec8d-4bb1-bd21-45e966f47ab6 tags:
Go back to [Notebook Outline](#toc) Go back to [Notebook Outline](#toc)
%% Cell type:markdown id:0c1cad59-81d0-4e24-ac33-13c4ca8c6dec tags: %% Cell type:markdown id:0c1cad59-81d0-4e24-ac33-13c4ca8c6dec tags:
### 2.5. Run a simulation <a class="anchor" id="section_2_5"></a> ### 2.4. Run a simulation <a class="anchor" id="section_2_5"></a>
%% Cell type:code id:15778e9c tags: %% Cell type:code id:15778e9c tags:
``` python ``` python
# Run the simulation, depending on the model parameter and downscale ratio, the running time varies largely. # Run the simulation, depending on the model parameter and downscale ratio, the running time varies largely.
M.simulation.simulate() M.simulation.simulate()
``` ```
%% Cell type:markdown id:72a89aeb-78b9-4642-be0d-6de4d6c8f817 tags: %% Cell type:markdown id:72a89aeb-78b9-4642-be0d-6de4d6c8f817 tags:
**Reminder**: The spike trains of simulated results are saved to the folder with path `./simulations/<simulation_label>/recordings` where the `<simulation_label>` is displayed in the output of 2.2. All statistics describing network dynamics are computed from the saved spike trains. **Note**: The spike trains of simulated results are saved to the folder with path `./simulations/<simulation_label>/recordings` where the `<simulation_label>` is displayed in the output of 2.2. All statistics describing network dynamics are computed from the saved spike trains.
%% Cell type:markdown id:fd6e3232 tags: %% Cell type:markdown id:fd6e3232 tags:
Go back to [Notebook Outline](#toc) Go back to [Notebook Outline](#toc)
%% Cell type:markdown id:bb71c922 tags: %% Cell type:markdown id:bb71c922 tags:
## S3. Visualization of Network Dynamics <a class="anchor" id="section_3"></a> ## S3. Visualization of Network Dynamics <a class="anchor" id="section_3"></a>
%% Cell type:markdown id:5d150e0d-9174-4737-be1d-0fa2ac282419 tags: %% Cell type:markdown id:5d150e0d-9174-4737-be1d-0fa2ac282419 tags:
**Important**: `cc_weights_factor` plays a crucial role in transitioning the network activity from the ground to the metastable state. In the full-scale network, the ground state and metastable state activities are achieved when this parameter is set to `1.0` and `1.9`, respectively. **Important**: `cc_weights_factor` plays a crucial role in transitioning the network activity from the ground to the metastable state. In the full-scale network, the ground state and metastable state activities are achieved when this parameter is set to `1.0` and `1.9`, respectively.
%% Cell type:code id:44473002-b970-4f48-ac3d-1e01093133fd tags: %% Cell type:code id:44473002-b970-4f48-ac3d-1e01093133fd tags:
``` python ``` python
# Create an instance of Analysis to load data # Create an instance of Analysis to load data
A = Analysis(M, M.simulation, data_list=['spikes'], load_areas=None) A = Analysis(M, M.simulation, data_list=['spikes'], load_areas=None)
``` ```
%% Cell type:markdown id:38ddd973 tags: %% Cell type:markdown id:38ddd973 tags:
### 3.1. Mean firing rate over simulated populations <a class="anchor" id="section_3_1"></a> ### 3.1. Mean firing rate over simulated populations <a class="anchor" id="section_3_1"></a>
%% Cell type:code id:bea30fc8 tags: %% Cell type:code id:bea30fc8 tags:
``` python ``` python
# Print the mean firing rate over simulated populations # Print the mean firing rate over simulated populations
from M2E_firing_rate import mean_firing_rate from M2E_firing_rate import mean_firing_rate
mean_firing_rate(M, data_path) mean_firing_rate(M, data_path)
``` ```
%% Cell type:markdown id:2714fd2b-df6e-45b9-a7f4-f240a8c65ecf tags: %% Cell type:markdown id:2714fd2b-df6e-45b9-a7f4-f240a8c65ecf tags:
### 3.2. Instantaneous firing rate over simulated areas <a class="anchor" id="section_3_2"></a> ### 3.2. Instantaneous firing rate over simulated areas <a class="anchor" id="section_3_2"></a>
%% Cell type:code id:61eb9d0d-06ef-454e-98c3-645152208979 tags: %% Cell type:code id:61eb9d0d-06ef-454e-98c3-645152208979 tags:
``` python ``` python
from M2E_firing_rate import plot_firing_rate_over_areas from M2E_firing_rate import plot_firing_rate_over_areas
plot_firing_rate_over_areas(M, data_path) plot_firing_rate_over_areas(M, data_path)
``` ```
%% Cell type:markdown id:de0317c8-1fcd-405c-b0c9-36336aa1f3ad tags: %% Cell type:markdown id:de0317c8-1fcd-405c-b0c9-36336aa1f3ad tags:
### 3.3. Time-averaged firing rate over simulated populations <a class="anchor" id="section_3_3"></a> ### 3.3. Time-averaged firing rate over simulated populations <a class="anchor" id="section_3_3"></a>
%% Cell type:markdown id:b6746ea4-91bd-44f5-acb6-83df15b05480 tags: %% Cell type:markdown id:b6746ea4-91bd-44f5-acb6-83df15b05480 tags:
An overview of time-averaged firing rate over simulated populations encoded in colors with areas along x-axis and populations along y-axis. The cells of population 4E and 4I in area TH are labeled with X as area TH does not have layer 4. An overview of time-averaged firing rate over simulated populations encoded in colors with areas along x-axis and populations along y-axis. The cells of population 4E and 4I in area TH are labeled with X as area TH does not have layer 4.
%% Cell type:code id:14fa641f-0371-413e-945c-c8d4579aead6 tags: %% Cell type:code id:14fa641f-0371-413e-945c-c8d4579aead6 tags:
``` python ``` python
from M2E_visualize_time_ave_pop_rates import plot_time_averaged_population_rates from M2E_visualize_time_ave_pop_rates import plot_time_averaged_population_rates
plot_time_averaged_population_rates(M, data_path) plot_time_averaged_population_rates(M, data_path)
``` ```
%% Cell type:markdown id:e91c436e-db94-4cd7-a531-29c032efeeae tags: %% Cell type:markdown id:e91c436e-db94-4cd7-a531-29c032efeeae tags:
### 3.4. Network dynamics <a class="anchor" id="section_3_4"></a> ### 3.4. Network dynamics <a class="anchor" id="section_3_4"></a>
%% Cell type:markdown id:2ab1e9e5-3eb8-40b2-a4e9-2e749978878d tags: %% Cell type:markdown id:2ab1e9e5-3eb8-40b2-a4e9-2e749978878d tags:
Comparable figures in our publications: <br> Comparable figures in our publications: <br>
1. Schmidt M, Bakker R, Shen K, Bezgin B, Diesmann M & van Albada SJ (2018) 1. Schmidt M, Bakker R, Shen K, Bezgin B, Diesmann M & van Albada SJ (2018)
A multi-scale layer-resolved spiking network model of A multi-scale layer-resolved spiking network model of
resting-state dynamics in macaque cortex. PLOS Computational Biology, 14(9): e1006359. [https://doi.org/10.1371/journal.pcbi.1006359](https://doi.org/10.1371/journal.pcbi.1006359) <br> resting-state dynamics in macaque cortex. PLOS Computational Biology, 14(9): e1006359. [https://doi.org/10.1371/journal.pcbi.1006359](https://doi.org/10.1371/journal.pcbi.1006359) <br>
**Fig 3. Ground state of the model.** <br> **Fig 3. Ground state of the model.** <br>
**Fig 5. Resting state of the model with χ = 1.9 (metastable state).** **Fig 5. Resting state of the model with χ = 1.9 (metastable state).**
%% Cell type:code id:ae19bcc3 tags: %% Cell type:code id:ae19bcc3 tags:
``` python ``` python
# Choose at most 3 areas from the areas_simulated to show their spiking activities # Choose at most 3 areas from the areas_simulated to show their spiking activities
# By default, the list is ['V1', 'V2', 'FEF'] when all areas from complete_area_list are simulated # By default, the list is ['V1', 'V2', 'FEF']
raster_areas = ['V1', 'V2', 'FEF'] raster_areas = ['V1', 'V2', 'FEF']
from M2E_visualize_dynamics import visual_dynamics from M2E_visualize_dynamics import visual_dynamics
visual_dynamics(M, data_path, raster_areas) visual_dynamics(M, data_path, raster_areas)
``` ```
%% Cell type:markdown id:b53058b5-c0bd-4837-8289-9226872317cc tags: %% Cell type:markdown id:b53058b5-c0bd-4837-8289-9226872317cc tags:
### 3.5. Functional connectivity <a class="anchor" id="section_3_5"></a> ### 3.5. Functional connectivity <a class="anchor" id="section_3_5"></a>
%% Cell type:markdown id:013adaf8-af8b-470e-94f0-b69121d1ca2c tags: %% Cell type:markdown id:013adaf8-af8b-470e-94f0-b69121d1ca2c tags:
Comparison of area-level functional connectivity (FC) between the down-scaled MAM and macaque experimental data. (A) Simulated FC measured by the zero-time-lag correlation coefficient of synaptic input currents. (B) FC of macaque resting-state fMRI (see Materials and methods). Comparison of area-level functional connectivity (FC) between the downscaled MAM and macaque experimental data. (A) Simulated FC measured by the zero-time-lag correlation coefficient of synaptic input currents. (B) FC of macaque resting-state fMRI (see Materials and methods in Schmidt et al. 2018).
%% Cell type:code id:b4b25621-618d-4594-8cf7-9b9002837d69 tags: %% Cell type:code id:b4b25621-618d-4594-8cf7-9b9002837d69 tags:
``` python ``` python
from M2E_visualize_fc import visualize_fc from M2E_visualize_fc import visualize_fc
visualize_fc(M, data_path) visualize_fc(M, data_path)
``` ```
%% Cell type:markdown id:ef74ca3e-98dc-49c9-a4a0-2c640e29b1d9 tags: %% Cell type:markdown id:ef74ca3e-98dc-49c9-a4a0-2c640e29b1d9 tags:
Go back to [Notebook Outline](#toc) Go back to [Notebook Outline](#toc)
%% Cell type:markdown id:eb4bdea1-384f-41b3-8d8c-7bd568ae1537 tags: %% Cell type:markdown id:eb4bdea1-384f-41b3-8d8c-7bd568ae1537 tags:
## Additional Notes <a class="anchor" id="section_4"></a> ## Additional Notes <a class="anchor" id="section_4"></a>
%% Cell type:markdown id:cd25cb76-31eb-4c06-9bf8-a0407967b141 tags: %% Cell type:markdown id:cd25cb76-31eb-4c06-9bf8-a0407967b141 tags:
1. Simulation data <br> 1. Simulation data <br>
The spike data of all simulated populations for all simulations are saved in `./simulations/<simulation_label>/recordings` where `<simulation_label>` can be accessed in the output of 2.2. Or users can see their latest simulation by checking the column "Last Modified" and find the folder with the latest change. The spike data of all simulated populations for all simulations are saved in `./simulations/<simulation_label>/recordings` where `<simulation_label>` can be accessed in the output of 2.2. Or users can see their latest simulation by checking the column "Last Modified" and find the folder with the latest change.
2. Statistics <br> 2. Statistics <br>
The statistics of network dynamics computed from the spike trains can be found in `./simulations/<simulation_label>/Analysis`. You may also find more statistics defined in `./multiarea_model/analysis.py` to explore more about network dynamics. The statistics of network dynamics computed from the spike trains can be found in `./simulations/<simulation_label>/Analysis`. You may also find more statistics defined in `./multiarea_model/analysis.py` to further explore the network dynamics.
3. Scripts for visualizing network dynamics <br> 3. Scripts for visualizing network dynamics <br>
The scripts for computing statistics and plotting the figures in S3 can be found in `./figures/MAM2EBRAINS`. The scripts for computing statistics and plotting the figures in S3 can be found in `./figures/MAM2EBRAINS`.
%% Cell type:markdown id:ae940386-f9ec-4556-93bb-f63c7053cbd3 tags: %% Cell type:markdown id:ae940386-f9ec-4556-93bb-f63c7053cbd3 tags:
Go back to [Notebook Outline](#toc) Go back to [Notebook Outline](#toc)
......
...@@ -199,7 +199,7 @@ class Simulation: ...@@ -199,7 +199,7 @@ class Simulation:
for area_name in self.areas_simulated: for area_name in self.areas_simulated:
a = Area(self, self.network, area_name) a = Area(self, self.network, area_name)
self.areas.append(a) self.areas.append(a)
print("Memory after {0} : {1:.2f} MB".format(area_name, self.memory() / 1024.)) print("Memory after the creation of area {0} : {1:.2f} MB".format(area_name, self.memory() / 1024.))
def cortico_cortical_input(self): def cortico_cortical_input(self):
""" """
...@@ -419,9 +419,8 @@ class Area: ...@@ -419,9 +419,8 @@ class Area:
self.create_populations() self.create_populations()
self.connect_devices() self.connect_devices()
self.connect_populations() self.connect_populations()
print("Rank {}: created area {} with {} local nodes".format(nest.Rank(), print()
self.name, print("Created area {}.".format(self.name))
self.num_local_nodes))
def __str__(self): def __str__(self):
s = "Area {} with {} neurons.".format( s = "Area {} with {} neurons.".format(
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment