Skip to content

Commit bb6d2e7

Browse files
committed
fix vulkan sgd
1 parent 283401d commit bb6d2e7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

ggml/src/ggml-vulkan/vulkan-shaders/opt_step_sgd.comp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
#version 450
22

33
#include "generic_head.comp"
4-
#include "types.comp"
5-
6-
#extension GL_EXT_control_flow_attributes : enable
74

85
layout(local_size_x = 512, local_size_y = 1, local_size_z = 1) in;
96

@@ -19,7 +16,7 @@ void main() {
1916
}
2017

2118
const float alpha = data_params[0];
22-
const float keep = data_params[1];
19+
const float keep = 1.f - alpha * data_params[1];
2320

2421
data_x[i] = data_x[i] * keep - alpha * data_grad[i];
2522
}

0 commit comments

Comments
 (0)