Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AdvRL19
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
flgw
AdvRL19
Commits
ab00315e
Commit
ab00315e
authored
Apr 29, 2019
by
Florian Gawrilowicz
Browse files
Options
Downloads
Patches
Plain Diff
Splitting out normalization
parent
c4496029
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
utils.py
+10
-0
10 additions, 0 deletions
utils.py
with
10 additions
and
0 deletions
utils.py
0 → 100644
+
10
−
0
View file @
ab00315e
import
numpy
as
np
def
normalize
(
data_n
,
mean
=
0
,
std
=
1
):
data_n
-=
np
.
mean
(
data_n
)
emp_std
=
np
.
std
(
data_n
)
if
np
.
isfinite
(
1.
/
emp_std
):
data_n
/=
emp_std
return
data_n
*
std
+
mean
\ No newline at end of file
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