File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed
Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -867,9 +867,7 @@ k_epsilon <- function() {
867867# ' @rdname k_epsilon
868868# ' @export
869869k_set_epsilon <- function (e ) {
870- keras $ backend $ set_epsilon(
871- e = e
872- )
870+ keras $ backend $ set_epsilon(e )
873871}
874872
875873
@@ -994,9 +992,7 @@ k_floatx <- function() {
994992# ' @rdname k_floatx
995993# ' @export
996994k_set_floatx <- function (floatx ) {
997- keras $ backend $ set_floatx(
998- floatx = floatx
999- )
995+ keras $ backend $ set_floatx(floatx )
1000996}
1001997
1002998
Original file line number Diff line number Diff line change @@ -115,3 +115,16 @@ test_backend("k_concatenate", {
115115 k_concatenate(list (x , y ), 1 )
116116})
117117
118+ test_backend(" k_set_floatx" , {
119+ skip_if_cntk()
120+ skip_if_theano()
121+ k_set_floatx(" float16" )
122+ expect_identical(k_floatx(), " float16" )
123+ })
124+
125+ test_backend(" k_set_epsilon" , {
126+ skip_if_cntk()
127+ skip_if_theano()
128+ k_set_epsilon(1e-4 )
129+ expect_equal(k_epsilon(), 1e-4 )
130+ })
You can’t perform that action at this time.
0 commit comments