-
Notifications
You must be signed in to change notification settings - Fork 2
changes for python3.6 #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Whadup
wants to merge
77
commits into
EigenPro:master
Choose a base branch
from
Whadup:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EigenPro
previously requested changes
Dec 10, 2017
Owner
EigenPro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Lukas! This neat modification is compatible with Python 2.7. So I would like to just merge it. But could you revert the change for the assert (L 40) in this commit.? I want to keep this for a while to avoid the relatively disappointing performance on CPU.
Author
|
I will post another pull request with my changes once I’ve written up my results using your algorithm.
Until then, maybe use this patch?
From f071377 Mon Sep 17 00:00:00 2001
From: Lukas Pfahler <lukas.pfahler@tu-dortmund.de>
Date: Tue, 5 Dec 2017 10:21:04 +0100
Subject: [PATCH] changes for python3.6
…---
run_expr.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/run_expr.py b/run_expr.py
index f2ba50e..c66e35d 100644
--- a/run_expr.py
+++ b/run_expr.py
@@ -128,7 +128,7 @@ trainers['Kernel EigenPro'] = Trainer(model=model,
# Assemble SGD trainer.
rff_weights = np.float32( # for Gaussian kernel
np.sqrt(2. / (2 * 5 ** 2)) # s = 5
- * np.random.randn(D, d/2))
+ * np.random.randn(D, d>>1))
input_shape = (D,)
x = Input(shape=input_shape, dtype='float32', name='feat')
rf_f = RFF(rff_weights, input_shape=input_shape)
@@ -159,7 +159,7 @@ trainers['EigenPro with random Fourier feature'] = Trainer(
model=model, x_train = x_train, x_test=x_test)
# Start training.
-for name, trainer in trainers.iteritems():
+for name, trainer in trainers.items():
print("")
initial_epoch=0
np.random.seed(1) # Keras uses numpy random number generator
--
2.13.1
On 10. Dec 2017, at 07:58, EigenPro ***@***.***> wrote:
@EigenPro requested changes on this pull request.
Thanks Lukas! This neat modification is compatible with Python 2.7. So I would like to just merge it. But could you revert the change for the assert (L 40) in this commit.? I want to keep this for a while to avoid the relatively disappointing performance on CPU.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#1 (review)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ACM4F64-bHhVlBzDbc_n47eJQu4pTFaeks5s-4EjgaJpZM4Q1-on>.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there,
to run on my mac with python 3.6, I had to do these small changes.
apparently, the api for collections has changed from
iteritems()toitems()and typechecking for numpy integers is more strict (int divided by 2 gives float)Hope this helps,
Cheers
Lukas