An example (for electrical conductivity) can be found in this Google Colab
import torch
from network import MS_Net
from pore_utils import rnd_array
from network_tools import get_masks
net = MS_Net(
num_scales := 4, # num of trainable convNets
num_features = 1, # input features (Euclidean distance, etc)
num_filters = 2, # num of kernels on each layer of the finest model (most expensive)
summary = True # print the model summary
)
x = rnd_array( size=128, scales = num_scales )
masks = get_masks( x[-1], scales = num_scales )
y = net( x, masks )[-1] # final prediction
Download the desired data from the digital rocks portal (or create your own via your preferred simulation method).
The following illustration shows how the information flows through the individual networks.
A high-level talk describing the MS-Net highlights is posted on youtube
If you use our code for your own research, we would be grateful if you cite our publication TiPM
@article{MSNET,
title = "Computationally Efficient Multiscale Neural Networks Applied to Fluid Flow in Complex 3D Porous Media",
journal = " Transp Porous Med",
year = "2021",
issn = "1573-1634",
doi = "https://doi.org/10.1007/s11242-021-01617-y",
url = "https://link.springer.com/article/10.1007/s11242-021-01617-y"
}