Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NIFTy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
ift
NIFTy
Commits
07381cfc
There was a problem fetching the pipeline summary.
Commit
07381cfc
authored
8 years ago
by
Theo Steininger
Browse files
Options
Downloads
Patches
Plain Diff
Removed blank lines and dead code.
parent
a07ff248
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!69
Master
,
!64
Martin's monster merge part 1/N: (hopefully) uncontroversial bits
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
nifty/basic_arithmetics.py
+0
-2
0 additions, 2 deletions
nifty/basic_arithmetics.py
nifty/minimization/vl_bfgs.py
+0
-44
0 additions, 44 deletions
nifty/minimization/vl_bfgs.py
with
0 additions
and
46 deletions
nifty/basic_arithmetics.py
+
0
−
2
View file @
07381cfc
...
@@ -31,10 +31,8 @@ def _math_helper(x, function):
...
@@ -31,10 +31,8 @@ def _math_helper(x, function):
result_val
=
x
.
val
.
apply_scalar_function
(
function
)
result_val
=
x
.
val
.
apply_scalar_function
(
function
)
result
=
x
.
copy_empty
(
dtype
=
result_val
.
dtype
)
result
=
x
.
copy_empty
(
dtype
=
result_val
.
dtype
)
result
.
val
=
result_val
result
.
val
=
result_val
elif
isinstance
(
x
,
distributed_data_object
):
elif
isinstance
(
x
,
distributed_data_object
):
result
=
x
.
apply_scalar_function
(
function
,
inplace
=
False
)
result
=
x
.
apply_scalar_function
(
function
,
inplace
=
False
)
else
:
else
:
result
=
function
(
np
.
asarray
(
x
))
result
=
function
(
np
.
asarray
(
x
))
...
...
This diff is collapsed.
Click to expand it.
nifty/minimization/vl_bfgs.py
+
0
−
44
View file @
07381cfc
...
@@ -77,8 +77,6 @@ class InformationStore(object):
...
@@ -77,8 +77,6 @@ class InformationStore(object):
self
.
_sy_store
=
{}
self
.
_sy_store
=
{}
self
.
_yy_store
=
{}
self
.
_yy_store
=
{}
# self.dot_matrix = {}
@property
@property
def
history_length
(
self
):
def
history_length
(
self
):
return
min
(
self
.
k
,
self
.
max_history_length
)
return
min
(
self
.
k
,
self
.
max_history_length
)
...
@@ -193,48 +191,6 @@ class InformationStore(object):
...
@@ -193,48 +191,6 @@ class InformationStore(object):
self
.
last_x
=
x
.
copy
()
self
.
last_x
=
x
.
copy
()
self
.
last_gradient
=
gradient
.
copy
()
self
.
last_gradient
=
gradient
.
copy
()
#
# k = self.k
# m = self.actual_history_length
# big_m = self.history_length
#
# # compute dot products
# for i in xrange(k-1, k-m-1, -1):
# # new_s with s
# key = (big_m+m, big_m+1+i)
# self.dot_matrix[key] = new_s.dot(self.s[i])
#
# # new_s with y
# key = (big_m+m, i+1)
# self.dot_matrix[key] = new_s.dot(self.y[i])
#
# # new_y with s
# if i != k-1:
# key = (big_m+1+i, k)
# self.dot_matrix[key] = new_y.dot(self.s[i])
#
# # new_y with y
# # actually key = (i+1, k) but the convention is that the first
# # index is larger than the second one
# key = (k, i+1)
# self.dot_matrix[key] = new_y.dot(self.y[i])
#
# # gradient with s
# key = (big_m+1+i, 0)
# self.dot_matrix[key] = gradient.dot(self.s[i])
#
# # gradient with y
# key = (i+1, 0)
# self.dot_matrix[key] = gradient.dot(self.y[i])
#
# # gradient with gradient
# key = (0, 0)
# self.dot_matrix[key] = gradient.dot(gradient)
#
# self.last_x = x
# self.last_gradient = gradient
#
class
LimitedList
(
object
):
class
LimitedList
(
object
):
def
__init__
(
self
,
history_length
):
def
__init__
(
self
,
history_length
):
...
...
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