-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
188ddba
commit 7ec9167
Showing
1 changed file
with
3 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -444,6 +444,7 @@ def pred_error(f_pred, data, iterator): | |
x = [data[0][t] for t in valid_index] | ||
y = [data[1][t] for t in valid_index] | ||
valid_err += f_pred(x, y) | ||
f_pred.sync_shared() | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
i += 1 | ||
|
||
return valid_err / i | ||
|
@@ -524,7 +525,9 @@ def train_iter(): | |
x, y = next(train_it) | ||
func_time = time.time() | ||
cost = f_grad_shared(x, y) | ||
cost.sync_shared() | ||
f_update(lrate) | ||
f_update.sync_shared() | ||
This comment has been minimized.
Sorry, something went wrong.
nouiz
Contributor
|
||
print("Func call time", time.time() - func_time) | ||
overhead_time = time.time() | ||
asgd() | ||
|
As there is no updates in that fct, this isn't useful I think.