Skip to content

Commit

Permalink
Clean fluid/operators/truncated_gaussian_random_op.h (PaddlePaddle#64155
Browse files Browse the repository at this point in the history
)

* Fix

* ci
  • Loading branch information
co63oc committed May 10, 2024
1 parent 65095af commit 93bd5ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 163 deletions.
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.

0 comments on commit 93bd5ee

Please sign in to comment.