Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Wolfgang Kilian
vorlesung-nnet
Commits
1062d719
Commit
1062d719
authored
Jun 04, 2019
by
Wolfgang Kilian
Browse files
Mehr Kommentare im Source-Code
parent
09a61723
Changes
3
Hide whitespace changes
Inline
Side-by-side
kinds.f90
View file @
1062d719
! Modul: Standard-"double" Zahlen für präzise Rechnung
! Wir nutzen die ISO-Definition von 64bit Real-Zahlen
!
! (In der Praxis identisch mit "double precision" in Fortran und "double" in C/C++)
module
kinds
use
,
intrinsic
::
iso_fortran_env
,
only
:
real64
...
...
neurons.f90
View file @
1062d719
! Modul: Datentyp "neuron" und seine Methoden
!
! Ein Neuron implementiert eine Linearform mit Parameter-Vektor b und Offset a
! gefolgt von einer nichtlinearen Abbildung (tanh)
module
neurons
use
kinds
,
only
:
wp
...
...
@@ -7,6 +12,7 @@ module neurons
public
::
neuron
type
::
neuron
private
real
(
wp
)
::
a
real
(
wp
),
dimension
(:),
allocatable
::
b
contains
...
...
@@ -17,6 +23,7 @@ module neurons
contains
! Ausgabe in übersichtlicher Form nach I/O-Unit u
subroutine
write
(
n
,
u
)
class
(
neuron
),
intent
(
in
)
::
n
integer
,
intent
(
in
)
::
u
...
...
@@ -31,6 +38,7 @@ contains
end
subroutine
write
! Initialisierung mit Werten für a und b
subroutine
init
(
n
,
a
,
b
)
class
(
neuron
),
intent
(
out
)
::
n
real
(
wp
),
intent
(
in
)
::
a
...
...
@@ -41,6 +49,7 @@ contains
end
subroutine
init
! Anwendung der Abbildung auf Vektor x
function
apply
(
n
,
x
)
result
(
z
)
class
(
neuron
),
intent
(
in
)
::
n
real
(
wp
),
dimension
(:),
intent
(
in
)
::
x
...
...
nnet.f90
View file @
1062d719
! Hauptprogramm: Neural Network - Ansatz
!
! Implementiert den Datentyp "neuron" und führt alle Unit Tests aus
! Ausgabe in das File "nnet.out"
program
nnet
implicit
none
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment