|
|
|
# VS2N MongoDB schemas
|
|
|
|
|
|
|
|
In VS2N, ... |
|
|
\ No newline at end of file |
|
|
|
In VS2N, we use MongoDB to store all the collected data from SNN simulations. This makes it possible to deploy VS2N on multiple nodes, for a faster and better user experience especially when working with large networks.
|
|
|
|
|
|
|
|
|
|
|
|
Each type of collected data is stored in one collection (the equivalent of a table in a relational database system), and all the collections on one simulation are stored in one MongoDB database.
|
|
|
|
|
|
|
|
In VS2N, the types of collected data from each SNN simulation (which are stored as collection each) are:
|
|
|
|
|
|
|
|
**Required**
|
|
|
|
- General information on the network.
|
|
|
|
- Spikes activity in the network.
|
|
|
|
- Neurons membrane potential updates in the network.
|
|
|
|
- Synapses weight activity in the network.
|
|
|
|
|
|
|
|
**Optional**
|
|
|
|
- Labels of each input to the network (if possible).
|
|
|
|
|
|
|
|
Each collection contains documents (the equivalent of a row in a table of a relational database system), each document has a specific schema that need to be respected by any simulator, in order for VS2N to work properly.
|
|
|
|
|
|
|
|
## Document schemas
|
|
|
|
A document schema is a JSON object that contains information about the shape, fields and type of data stored in that document.
|
|
|
|
|
|
|
|
```JSON
|
|
|
|
{
|
|
|
|
"properties" : {
|
|
|
|
"_id" : { "bsonType" : "objectId" },
|
|
|
|
"name" : { "bsonType" : "string" }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
<center>Example of a document schema</center>
|
|
|
|
<br>
|
|
|
|
|
|
|
|
## VS2N documents schemas
|
|
|
|
## 1- General information schemas:
|
|
|
|
In this collection, there are two schemas, the first one contains information about:
|
|
|
|
- Used dataset
|
|
|
|
- Date of simulation
|
|
|
|
- Name of the simulation
|
|
|
|
- Number of layers
|
|
|
|
- Number of neurons per layer
|
|
|
|
|
|
|
|
```JSON
|
|
|
|
{
|
|
|
|
"properties" : {
|
|
|
|
"_id" : { "bsonType": "objectId" }, // id
|
|
|
|
"n" : { "bsonType": "string" }, // simulation name
|
|
|
|
"L:N" : { "<JSON>" }, // layer name : neurons number
|
|
|
|
"T" : { "bsonType": "string" }, // simulation date
|
|
|
|
"D" : { "bsonType": "string" } // dataset name
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
<center>General information schema - 1</center>
|
|
|
|
<br>
|
|
|
|
|
|
|
|
```JSON
|
|
|
|
{
|
|
|
|
"_id" : ObjectId("603834c376e245cd78319032"),
|
|
|
|
"n" : "My network",
|
|
|
|
"L:N" : { "Input" : 784, "layer1" : 100 },
|
|
|
|
"T" : "26-02-2021-00:37:39",
|
|
|
|
"D" : "Mnist"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
<center>Example</center>
|
|
|
|
|
|
|
|
The second one contains optional information, which are collected if there was test phase after training:
|
|
|
|
- Network accuracy
|
|
|
|
- final neuron classes (for non supervised learning)
|
|
|
|
|
|
|
|
```JSON
|
|
|
|
{
|
|
|
|
"properties" : {
|
|
|
|
"_id" : { "bsonType": "objectId" }, // id
|
|
|
|
"MaxS" : { "bsonType": "string" }, // network accuracy (Max Spike)
|
|
|
|
"NLabel" : { "<Array of JSON>" }, // neurons labels
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
<center>General information schema - 2</center>
|
|
|
|
<br>
|
|
|
|
|
|
|
|
```JSON
|
|
|
|
{
|
|
|
|
"_id" : ObjectId("60163a04dec986560a8d907a"),
|
|
|
|
"MaxS" : 83.51,
|
|
|
|
"NLabel" : [
|
|
|
|
{ "L" : "Layer1", "N" : "13", "Label" : "2" },
|
|
|
|
{ "L" : "Layer1", "N" : "99", "Label" : "1" },
|
|
|
|
{ "L" : "Layer1", "N" : "97", "Label" : "0" },
|
|
|
|
...
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
<center>Example</center>
|
|
|
|
|
|
|
|
## 2- Spikes activity schemas:
|
|
|
|
In this collection, there are two schemas, the first one contains information about:
|
|
|
|
- Used dataset
|
|
|
|
|
|
|
|
## 3- Neurons membrane potential schemas:
|
|
|
|
In this collection, there are two schemas, the first one contains information about:
|
|
|
|
- Used dataset
|
|
|
|
|
|
|
|
## 4- Synapses weight activity schemas:
|
|
|
|
In this collection, there are two schemas, the first one contains information about:
|
|
|
|
- Used dataset |
|
|
\ No newline at end of file |