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

Clean fluid/operators/truncated_gaussian_random_op.h #64155

Merged
merged 3 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions paddle/fluid/distributed/ps/table/depends/initializers.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#include <vector>

#include "paddle/common/flags.h"
#include "paddle/fluid/operators/truncated_gaussian_random_op.h"
#include "paddle/phi/core/generator.h"
#include "paddle/phi/kernels/funcs/truncated_normal.h"

namespace paddle {
namespace distributed {
Expand Down Expand Up @@ -124,13 +124,13 @@ class TruncatedGaussianInitializer : public Initializer {
}

float GetValue() override {
::paddle::operators::TruncatedNormal<float> truncated_normal(mean_, std_);
TruncatedNormal<float> truncated_normal(mean_, std_);
float value = truncated_normal(dist_(*random_engine_));
return value;
}

void GetValue(float *value, int numel) {
::paddle::operators::TruncatedNormal<float> truncated_normal(mean_, std_);
TruncatedNormal<float> truncated_normal(mean_, std_);
for (int x = 0; x < numel; ++x) {
value[x] = truncated_normal(dist_(*random_engine_));
}
Expand Down
160 changes: 0 additions & 160 deletions paddle/fluid/operators/truncated_gaussian_random_op.h

This file was deleted.