Skip to content
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

Merged
merged 18 commits into from
Aug 24, 2017
Merged

init mnist #3564

merged 18 commits into from
Aug 24, 2017

Conversation

jacquesqiao
Copy link
Member

@jacquesqiao jacquesqiao commented Aug 18, 2017

fix: #3557 use low level API to construct a mnist training logic

  1. fix sgd-op [done] 8b3d33a
  2. add rowwiseadd-grad-op [done] "add rowwise add backward op" #3183 82b820e
  3. add mul-grad-op [done] "mul op gradient" #3379
  4. fix math matmul [done] fix math matmul #3577
  5. fix rowwiseadd-grad-op [done] Fix rowwise add #3604
  6. register rowwise_grad_gpu_op [done] register rowwise add gpu kernel #3660

@jacquesqiao jacquesqiao changed the title init minst init mnist Aug 18, 2017
return cost_name


def get_backward_net(forward_net):
Copy link
Collaborator

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):
Copy link
Collaborator

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(
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

dzhwinter
dzhwinter previously approved these changes Aug 24, 2017
Copy link
Contributor

@dzhwinter dzhwinter left a 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):
Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@jacquesqiao jacquesqiao merged commit b9a4b2e into PaddlePaddle:develop Aug 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

write mnist training with the current python API
3 participants