Skip to content

Commit 1f4cab9

Browse files
authored
Add files via upload
1 parent b89100d commit 1f4cab9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Multiclass_Classification/EfficientNet/src/networks.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ torch::Tensor StochasticDepthImpl::forward(torch::Tensor x){
3131
float p_bar;
3232
torch::Tensor mask, out;
3333

34-
if (!this->is_training() || p < eps) return x;
35-
else if (p > 1.0 - eps) return torch::zeros_like(x);
34+
if (!this->is_training() || this->p < eps) return x;
35+
else if (this->p > 1.0 - eps) return torch::zeros_like(x);
3636

3737
p_bar = 1.0 - this->p;
3838
mask = torch::bernoulli(torch::full({x.size(0), 1, 1, 1}, p_bar, x.options()));

0 commit comments

Comments
 (0)