-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
init mnist #3564
init mnist #3564
Conversation
return cost_name | ||
|
||
|
||
def get_backward_net(forward_net): |
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.
create_backward_net
return net | ||
|
||
|
||
def print_inputs_outputs(op): |
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.
debug_print_op
var = scope.new_var(param_name) | ||
tensor = var.get_tensor() | ||
tensor.set_dims(dims) | ||
data = numpy.random.uniform( |
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.
as a demo, maybe we better use the built-in operator?
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.
done
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.
LGTM++
cost_grad.set(numpy.ones(cost_shape).astype("float32"), place) | ||
|
||
|
||
def mean_cost(cost): |
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.
mean cost get the cross_entropy output for debugging. we'd better rename this snippet.
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.
done
fix: #3557 use low level API to construct a mnist training logic
sgd-op
[done] 8b3d33arowwiseadd-grad-op
[done] "add rowwise add backward op" #3183 82b820emul-grad-op
[done] "mul op gradient" #3379math matmul
[done] fix math matmul #3577rowwiseadd-grad-op
[done] Fix rowwise add #3604rowwise_grad_gpu_op
[done] register rowwise add gpu kernel #3660