# Laptop crashes while trying to compute/plot inverse solution. I suspect my forward model is too intricate. How to address?

**URL:** <https://mne.discourse.group/t/laptop-crashes-while-trying-to-compute-plot-inverse-solution-i-suspect-my-forward-model-is-too-intricate-how-to-address/6016>\
**Category:** Support & Discussions\
**Created:** [December 1, 2022, 12:17am UTC](https://mne.discourse.group/t/laptop-crashes-while-trying-to-compute-plot-inverse-solution-i-suspect-my-forward-model-is-too-intricate-how-to-address/6016 "2022-12-01T00:17:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CJ-Wave](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/cj-wave/32/2109_2.png) [@CJ-Wave](https://mne.discourse.group/u/CJ-Wave)\
**Post date:** [December 1, 2022, 12:17am UTC](https://mne.discourse.group/t/laptop-crashes-while-trying-to-compute-plot-inverse-solution-i-suspect-my-forward-model-is-too-intricate-how-to-address/6016/1 "2022-12-01T00:17:13Z")

</div>

[https://mne.tools/stable/auto\_tutorials/forward/35\_eeg\_no\_mri.html](https://mne.tools/stable/auto_tutorials/forward/35_eeg_no_mri.html)  
I followed the tutorial here, as I’d like to start working in the 3-dimensional  
When I check my resources, Python has chewed through all my memory. I saw this:  
\<Forward | MEG channels: 0 | EEG channels: 19 | Source space: Surface with 20484 vertices | Source orientation: Free\>  
20484 vertices seems excessive. Any tips on how I can reduce this so I can start doing calculations/analysis? Thanks!

Edit: If it helps, I am trying to do lorettas/source localization when I only have eeg data. I don’t need an extreme degree of precision, just something that is good enough to test locally before I deploy on the cloud.

---

<div class="post-metadata">

**Author:** ![drammock](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/drammock/32/4_2.png) [@drammock](https://mne.discourse.group/u/drammock)\
**Post date:** [December 7, 2022, 11:03pm UTC](https://mne.discourse.group/t/laptop-crashes-while-trying-to-compute-plot-inverse-solution-i-suspect-my-forward-model-is-too-intricate-how-to-address/6016/2 "2022-12-07T23:03:12Z")

</div>

this line of that tutorial:

```python
src = op.join(fs_dir, 'bem', 'fsaverage-ico-5-src.fif')

```

is loading the source space that has 20484 vertices (ico-5). You can consider using [mne.decimate\_surface — MNE 1.2.2 documentation](https://mne.tools/stable/generated/mne.decimate_surface.html) to reduce it, or you can manually set up a lower-resolution source space [mne.setup\_source\_space — MNE 1.2.2 documentation](https://mne.tools/stable/generated/mne.setup_source_space.html). I’d probably to the latter, it seems easier.

---

<div class="post-metadata">

**Author:** ![drammock](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/drammock/32/4_2.png) [@drammock](https://mne.discourse.group/u/drammock)\
**Post date:** [December 8, 2022, 2:58pm UTC](https://mne.discourse.group/t/laptop-crashes-while-trying-to-compute-plot-inverse-solution-i-suspect-my-forward-model-is-too-intricate-how-to-address/6016/3 "2022-12-08T14:58:08Z")

</div>

I forgot to include this link, to the different source space “presets” for number of vertices. [The typical M/EEG workflow — MNE 1.2.2 documentation](https://mne.tools/stable/overview/cookbook.html#setting-up-the-source-space)
