Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
lib4neuro
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MolDyn
lib4neuro
Commits
9479e6a1
Commit
9479e6a1
authored
7 years ago
by
Martin Beseda
Browse files
Options
Downloads
Patches
Plain Diff
FIX: Fixed bugs after changing kinds of types from 4-bytes to *_4neuro
parent
d3744eba
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/connection_m.f90
+3
-3
3 additions, 3 deletions
src/connection_m.f90
src/connection_m.fun
+2
-2
2 additions, 2 deletions
src/connection_m.fun
src/neuron_m.f90
+5
-5
5 additions, 5 deletions
src/neuron_m.f90
with
10 additions
and
10 deletions
src/connection_m.f90
+
3
−
3
View file @
9479e6a1
...
...
@@ -138,7 +138,7 @@ module connection_m
class
(
neuron_t
),
pointer
,
intent
(
in
)
::
output_neuron
real
(
kind
=
real_4neuro
)
::
weight
type
(
connection_t
),
pointer
::
new_obj
integer
(
kind
=
integer_4neuro
)
::
values
(
8
)
!< values(8) is used as seed
integer
(
kind
=
4
)
::
values
(
8
)
!< values(8) is used as seed
#ifdef TIME_PROFILING
real
::
start_time
...
...
@@ -251,7 +251,7 @@ module connection_m
!! @return Weight of the connection (type real)
function
get_weight_impl
(
this
)
result
(
weight
)
class
(
connection_t
),
intent
(
in
)
::
this
real
::
weight
real
(
kind
=
real_4neuro
)
::
weight
#ifdef TIME_PROFILING
real
::
start_time
call
time_profiling_start
(
start_time
)
...
...
@@ -357,7 +357,7 @@ module connection_m
class
(
neuron_t
),
pointer
,
intent
(
in
)
::
output_neuron
real
(
kind
=
real_4neuro
)
::
weight
type
(
interval_connection_t
),
pointer
::
new_obj
integer
(
kind
=
integer_4neuro
)
::
values
(
8
)
integer
(
kind
=
4
)
::
values
(
8
)
#ifdef TIME_PROFILING
real
::
start_time
call
time_profiling_start
(
start_time
)
...
...
This diff is collapsed.
Click to expand it.
src/connection_m.fun
+
2
−
2
View file @
9479e6a1
...
...
@@ -26,7 +26,7 @@ setup
n1_p
=>
mock_neuron_t
()
n2_p
=>
mock_neuron_t
()
write
(*
,*)
'Creating
an
instance
of
the
class
interval_connection_t
.
..
'
con
=>
connection_t
(
n1_p
,
n2_p
,
5.25
)
con
=>
connection_t
(
n1_p
,
n2_p
,
real
(
5.25
,
real_4neuro
)
)
nullify
(
dummy_p
)
write
(*
,*)
'Ready
for
test
.
'
end
setup
...
...
@@ -57,7 +57,7 @@ test getters_setters
!
Test
of
get_weight
assert_real_equal
(
con%get_weight
(),
5.25
e+
0
)
!
Test
of
adjust_weight
call
con%adjust_weight
(
1.0
)
call
con%adjust_weight
(
real
(
1.0
,
real_4neuro
)
)
assert_real_equal
(
con%get_weight
(),
6.25
e+
0
)
write
(*
,*)
'
.
..
finished
+++'
end
test
...
...
This diff is collapsed.
Click to expand it.
src/neuron_m.f90
+
5
−
5
View file @
9479e6a1
...
...
@@ -97,7 +97,7 @@ module neuron_m
type
,
extends
(
neuron_t
)
::
binary_neuron_t
private
real
::
threshold
!< When neuron potential exceeds this value, neuron becomes excited
real
(
kind
=
real_4neuro
)
::
threshold
!< When neuron potential exceeds this value, neuron becomes excited
contains
...
...
@@ -132,8 +132,8 @@ module neuron_m
private
!! Coefficients for the linear activation function in format 'f(x)=a*x + b'
real
::
a_coef
!> The coefficient 'a' in the activation function f(x)=a*x + b
real
::
b_coef
!> The coefficient 'b' in the activation function f(x)=a*x + b
real
(
kind
=
real_4neuro
)
::
a_coef
!> The coefficient 'a' in the activation function f(x)=a*x + b
real
(
kind
=
real_4neuro
)
::
b_coef
!> The coefficient 'b' in the activation function f(x)=a*x + b
contains
...
...
@@ -163,7 +163,7 @@ module neuron_m
type
,
extends
(
neuron_t
)
::
logistic_neuron_t
private
real
::
alpha_coef
real
(
kind
=
real_4neuro
)
::
alpha_coef
contains
...
...
@@ -366,7 +366,7 @@ module neuron_m
!! @return Pointer to the instance of the class binary_neuron_t
function
new_binary_neuron
()
result
(
new_obj
)
type
(
binary_neuron_t
),
pointer
::
new_obj
integer
(
kind
=
integer_4neuro
)
::
values
(
8
)
integer
(
kind
=
4
)
::
values
(
8
)
#ifdef TIME_PROFILING
real
::
start_time
call
time_profiling_start
(
start_time
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment