User contributions for Davrot
From Master of Neuroscience Wiki
22 October 2025
- 16:1316:13, 22 October 2025 diff hist +4,810 N 2022: Synchronization and dynamic oscillations in the visual system Created page with "'''Oscillatory activity is ubiquitous throughout the cortex and has been hypothesized to play a central role for brain function, for example, in realizing selective information routing under attention. Fundamental for establishing oscillatory activity are recurrently coupled neural circuits which engage in a collective dynamics when driven externally. In this mini-project, you will implement a simple network model which is capable to generate gamma-frequency oscillations..." current Tag: Visual edit
- 16:1316:13, 22 October 2025 diff hist +8 N File:Ing-ping.png No edit summary current
- 16:1116:11, 22 October 2025 diff hist +4,417 N 2022: Divisive inhibition: a dynamical circuit for change detection Created page with "'''Neural computation is highly flexible and adjusts the spatio-temporal context of external stimuli and to the current behavioral task. This flexibility is an important aspect why squishy brains are under the rapidly changing conditions in daily life still superior to machines. Divisive inhibition is a fundamental concept realizing an adaptive dynamics which has interesting functional consequences. For example, it can enhance changes in the sensory input:''' '''Think o..." current Tag: Visual edit
- 16:1116:11, 22 October 2025 diff hist +15 N File:Fig divine data.png No edit summary current
- 16:1016:10, 22 October 2025 diff hist +16 N File:Fig divine model.png No edit summary current
- 16:0816:08, 22 October 2025 diff hist −409 2022: Deep Networks and Pytorch No edit summary current Tag: Visual edit
- 16:0616:06, 22 October 2025 diff hist +5,058 N 2022: Deep Networks and Pytorch Created page with "'''When in our modern world a problem is too tedious or too complicated to solve, it is always a good idea to promise an AI solution to handle the problem for us. AI, short for Artificial Intelligence, is the information age’s word for magic. In this project, we will take a deeper look into machine learning. Machine learning is typically what the people on the street mean by AI. In machine learning, sophisticated algorithms extract the underlying statistical structure..." Tag: Visual edit
- 16:0516:05, 22 October 2025 diff hist −176 2022: Preparation -- Python class with and without classes No edit summary current Tag: Visual edit
- 16:0316:03, 22 October 2025 diff hist +5,887 N 2022: Preparation -- Python class with and without classes Created page with "'''Programming has to be practiced, it can not be learned from looking at slides alone. Here we give you some simple tasks to implement in Python, which add up to a mini-simulation of synaptic transmission in the end. We structured this exercise such that you can start with simple tasks and add complexity with each additional concept you learn in our lectures.''' == Task 0. Get ready to create Python programs == === a. === [https://davrot.github.io/pytutorial/workflow/..." Tag: Visual edit
- 16:0216:02, 22 October 2025 diff hist −12 Python Tutorial →Advanced Studies Tag: Visual edit
- 15:5915:59, 22 October 2025 diff hist +1,870 Python Tutorial No edit summary
- 15:3215:32, 22 October 2025 diff hist +10,554 N Symbolic Computation Created page with "Questions to [mailto:davrot@uni-bremen.de David Rotermund]<syntaxhighlight lang="shell">pip install sympy</syntaxhighlight> === Overview tutorials === {| class="wikitable" |[https://docs.sympy.org/latest/tutorials/intro-tutorial/basic_operations.html Basic Operations] |- |[https://docs.sympy.org/latest/tutorials/intro-tutorial/printing.html Printing] |- |[https://docs.sympy.org/latest/tutorials/intro-tutorial/simplification.html Simplification] |- |[https://docs.sympy.o..." current Tag: Visual edit
- 15:3115:31, 22 October 2025 diff hist +4 N File:25 1.png No edit summary current
- 15:3115:31, 22 October 2025 diff hist +7 N File:25 qiaf.png No edit summary current
21 October 2025
- 16:1116:11, 21 October 2025 diff hist +56 N A fast non-introduction Davrot moved page A fast non-introduction to Tensorflow / Keras A fast non-introduction current Tag: New redirect
- 16:1116:11, 21 October 2025 diff hist 0 m Tensorflow / Keras A fast non-introduction Davrot moved page A fast non-introduction to Tensorflow / Keras A fast non-introduction current
- 16:1016:10, 21 October 2025 diff hist −59 Tensorflow / Keras A fast non-introduction →With data augmentation Tag: Visual edit
- 16:0916:09, 21 October 2025 diff hist −38 Tensorflow / Keras A fast non-introduction →Basic
- 16:0916:09, 21 October 2025 diff hist −58 Tensorflow / Keras A fast non-introduction →Tensorflow / Keras – A fast non-introduction Tag: Visual edit
- 16:0816:08, 21 October 2025 diff hist +29,422 N Tensorflow / Keras A fast non-introduction Created page with " = Tensorflow / Keras – A fast non-introduction = {:.no_toc} <nav class="toc-class"> * TOC {:toc} </nav> == Top == This is a fast overview how to get an MNIST example running under TF Keras If you just want to start with Tensorflow / Keras (especially if it is a scientific project), then you want to reconsider using Keras. In this case please check (& use) PyTorch. Questions to [mailto:davrot@uni-bremen.de David Rotermund] == Data loader / Data generator =..." Tag: Visual edit
- 16:0616:06, 21 October 2025 diff hist +9,775 N The fast and furious way (CPU and GPU CUDA) Created page with "Let us assume that you know what you are doing. And also let us assume that you notices how extremely slow the “correct” way of communication between Python and C++ is. Well the following section is for you… Questions to [mailto:davrot@uni-bremen.de David Rotermund] == Design corner stone == It is the job of Python (Numpy or PyTorch) to provide the tensors from which we read and in which we write. In the cpp domain, we will use this matrices as the interface to P..." current Tag: Visual edit
- 16:0516:05, 21 October 2025 diff hist +11,675 N PyBind11 Stub-Generation Created page with "Questions to [mailto:davrot@uni-bremen.de David Rotermund] == ModuleStubsGenerator == If you editor / syntax highlighting complains then you might need module stubs. This is the way how I automatically generate my pybind11-stubs<syntaxhighlight lang="shell">pip install pybind11-stubgen</syntaxhighlight><syntaxhighlight lang="python"># Based on # https://github.com/sizmailov/pybind11-stubgen/blob/master/pybind11_stubgen/__init__.py from __future__ import annotations im..." current Tag: Visual edit
- 16:0416:04, 21 October 2025 diff hist −15 Expanding Python with C++ modules →Makefile current
- 16:0316:03, 21 October 2025 diff hist +510 Expanding Python with C++ modules →The test program (test.py)
- 16:0116:01, 21 October 2025 diff hist +9,786 Expanding Python with C++ modules →The save (and slow) way to communicate (MyModuleCPU.cpp)
- 15:5915:59, 21 October 2025 diff hist +2 Expanding Python with C++ modules →The class definition of MyModule
- 15:5815:58, 21 October 2025 diff hist +2,074 Expanding Python with C++ modules →The class definition of MyModule (MyModuleCPU.h)
- 15:5715:57, 21 October 2025 diff hist +461 Expanding Python with C++ modules →The wrapper file (PyMyModuleCPU.cpp)
- 15:5415:54, 21 October 2025 diff hist +1 Expanding Python with C++ modules →Makefile
- 15:5415:54, 21 October 2025 diff hist +9 Expanding Python with C++ modules →Makefile
- 15:5315:53, 21 October 2025 diff hist −35 Expanding Python with C++ modules →A very simple example
- 15:5315:53, 21 October 2025 diff hist −4 Expanding Python with C++ modules →Makefile
- 15:5215:52, 21 October 2025 diff hist +925 Expanding Python with C++ modules →Makefile
- 15:5215:52, 21 October 2025 diff hist +125 Expanding Python with C++ modules →Makefile
- 15:4715:47, 21 October 2025 diff hist +15 Expanding Python with C++ modules →A very simple example
- 15:0815:08, 21 October 2025 diff hist +20,775 N Expanding Python with C++ modules Created page with "A minimal introduction in how to use PyBind11. PyBind11 allows you to extend Python with C++ modules which are written in C++11 or newer. Questions to [mailto:davrot@uni-bremen.de David Rotermund] == A very simple example == What do we need in the most minimal scenario? * Makefile plus a .env file * Module wrapper (PyMyModuleCPU.cpp) * The module (MyModuleCPU.cpp and MyModuleCPU.h) * Some test code test.py == Makefile == If you are programming..." Tag: Visual edit
- 14:5814:58, 21 October 2025 diff hist +6,056 N Fisher Exact Test: Test if your performance difference is significant Created page with "Questions to [mailto:davrot@uni-bremen.de David Rotermund] == [https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.fisher_exact.html scipy.stats.fisher_exact] == <syntaxhighlight lang="python">scipy.stats.fisher_exact(table, alternative='two-sided')</syntaxhighlight><blockquote>Perform a Fisher exact test on a 2x2 contingency table. The null hypothesis is that the true odds ratio of the populations underlying the observations is one, and the observations w..." current Tag: Visual edit
- 14:5814:58, 21 October 2025 diff hist +4 N File:24 2.png No edit summary current
- 14:5814:58, 21 October 2025 diff hist +4 N File:24 1.png No edit summary current
- 14:5514:55, 21 October 2025 diff hist +1,972 N How to take advantage of a learning rate scheduler for your non-Pytorch project Created page with "Pytorch provides you with so called lr_scheduler (learning rate scheduler). Their job is to control the learning rate according the development of the loss during learning. How can we use it for our own stimulation, without using the rest of PyTorch? Questions to [mailto:davrot@uni-bremen.de David Rotermund] In a first step we build a dummy torch layer from a nn.Module. It contains only the learning rate as a registered parameter:<syntaxhighlight lang="python">my_modul..." current Tag: Visual edit
- 14:5514:55, 21 October 2025 diff hist +2,361 N How to take advantage of an optimizer for your non-Pytorch project Created page with "Pytorch provides you with optimizer. Their job is to update your parameter (e.g. weights) with a gradient. How can we use it for our own stimulation, without using the rest of PyTorch? Questions to [mailto:davrot@uni-bremen.de David Rotermund] In a first step we build a dummy torch layer from a '''nn.Module'''. It contains a registered parameter: (here it is the weight). == Dummy torch layer == <syntaxhighlight lang="python">import torch my_module: torch.nn.Module =..." current Tag: Visual edit
- 14:5314:53, 21 October 2025 diff hist +4,378 N Unfold: How to manually calculate the indices for a sliding 2d window Created page with "Sometimes it is important to get the all the indices that correspond to the elements in one window position of a CNN or pooling operation. In a simple case you could do it by hand. But what if you have padding, dilation beside the input size, kernel size and stride? Anyway, who would do it by hand if PyTorch can do it for you? Questions to [mailto:davrot@uni-bremen.de David Rotermund] == The problem == Assume we have a 28x28 input image and a 5x5 kernel & stride o..." current Tag: Visual edit
- 14:5214:52, 21 October 2025 diff hist +10,744 N Replace the automatic autograd with your own torch.autograd.Function Created page with "Questions to [mailto:davrot@uni-bremen.de David Rotermund] == [https://pytorch.org/docs/stable/notes/extending.html#extending-autograd Extending torch.autograd] == === [https://pytorch.org/docs/stable/notes/extending.html#when-to-use When to use] === <blockquote>In general, implement a custom function if you want to perform computations in your model that are not differentiable or rely on non-PyTorch libraries (e.g., NumPy), but still wish for your operation to chain w..." current Tag: Visual edit
- 14:5214:52, 21 October 2025 diff hist +4 N File:23 1.png No edit summary current
- 14:5014:50, 21 October 2025 diff hist +4,682 N Write your own layer Created page with "Questions to [mailto:davrot@uni-bremen.de David Rotermund] == Writing a layer based on linear == I am rewriting the code for [https://pytorch.org/docs/stable/_modules/torch/nn/modules/linear.html#Linear Linear] as my own layer. __init__(): It contains a tensor for the weights and optionally a second tensor for the bias. Both tensors are wrapped within the torch.nn.Parameter class. This is necessary, otherwise the optimizer will not find them. Afterwards the tensors wil..." current Tag: Visual edit
- 14:5014:50, 21 October 2025 diff hist +4 N File:22 1.png No edit summary current
- 14:3214:32, 21 October 2025 diff hist +34,741 N Train the network Created page with "Training the weights and biases of the network. Questions to [mailto:davrot@uni-bremen.de David Rotermund] == An example setup == === Network === '''Note: Okay, I forgot the full layer somehow but it is still at 99%.'''<syntaxhighlight lang="python">import torch # Some parameters input_number_of_channel: int = 1 input_dim_x: int = 24 input_dim_y: int = 24 number_of_output_channels_conv1: int = 32 number_of_output_channels_conv2: int = 64 number_of_output_channels_fl..." current Tag: Visual edit
- 14:3214:32, 21 October 2025 diff hist +4 N File:21 1.png No edit summary current
- 14:2814:28, 21 October 2025 diff hist +40,546 N Creating networks Created page with "In these days, building networks is very important. Questions to [mailto:davrot@uni-bremen.de David Rotermund] == A fast way to build a network with [https://pytorch.org/docs/stable/generated/torch.nn.Sequential.html#torch.nn.Sequential Sequential] == <syntaxhighlight lang="python">CLASS torch.nn.Sequential(*args: Module)</syntaxhighlight><blockquote>A sequential container. Modules will be added to it in the order they are passed in the constructor.</blockquote>Example..." current Tag: Visual edit
- 14:2714:27, 21 October 2025 diff hist +9 N File:Network 0.png No edit summary current