| 1866 | } |
| 1867 | |
| 1868 | enum ggml_opt_optimizer_type common_opt_get_optimizer(const char * n) { |
| 1869 | if (eq_case_insensitive("adamw", n)) { |
| 1870 | return GGML_OPT_OPTIMIZER_TYPE_ADAMW; |
| 1871 | } |
| 1872 | if (eq_case_insensitive("sgd", n)) { |
| 1873 | return GGML_OPT_OPTIMIZER_TYPE_SGD; |
| 1874 | } |
| 1875 | return GGML_OPT_OPTIMIZER_TYPE_COUNT; |
| 1876 | } |
| 1877 | |
| 1878 | // TODO simplify to use just log and exp |
| 1879 | static float const k_log_2 = std::log(2.f); |
no test coverage detected