Skip to content

Commit 8631738

Browse files
Dobiasdclaude
andcommitted
Apply auto_format.sh
Fixes clang-format-lint failures: alphabetical include order in fdeep.hpp and import_model.hpp, ternary indentation in IntegerLookup creator, plus a drive-by indentation fix in attention_layer.hpp that was already drifting. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 2309fdd commit 8631738

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

include/fdeep/fdeep.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
#include "fdeep/convolution.hpp"
1212
#include "fdeep/filter.hpp"
1313
#include "fdeep/node.hpp"
14+
#include "fdeep/recurrent_ops.hpp"
1415
#include "fdeep/shape2.hpp"
1516
#include "fdeep/shape3.hpp"
1617
#include "fdeep/tensor.hpp"
1718
#include "fdeep/tensor_pos.hpp"
1819
#include "fdeep/tensor_shape.hpp"
1920
#include "fdeep/tensor_shape_variable.hpp"
20-
#include "fdeep/recurrent_ops.hpp"
2121

2222
#include "fdeep/import_model.hpp"
2323

include/fdeep/import_model.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@
9696
#include "fdeep/layers/soft_shrink_layer.hpp"
9797
#include "fdeep/layers/softmax_layer.hpp"
9898
#include "fdeep/layers/softplus_layer.hpp"
99-
#include "fdeep/layers/stacked_rnn_layer.hpp"
10099
#include "fdeep/layers/softsign_layer.hpp"
101100
#include "fdeep/layers/sparse_plus_layer.hpp"
102101
#include "fdeep/layers/square_plus_layer.hpp"
102+
#include "fdeep/layers/stacked_rnn_layer.hpp"
103103
#include "fdeep/layers/subtract_layer.hpp"
104104
#include "fdeep/layers/swish_layer.hpp"
105105
#include "fdeep/layers/tanh_layer.hpp"
@@ -808,7 +808,8 @@ namespace internal {
808808
const std::size_t num_oov_indices = cfg["num_oov_indices"];
809809
const bool has_mask_token = !cfg["mask_token"].is_null();
810810
const std::int64_t mask_token = has_mask_token
811-
? static_cast<std::int64_t>(cfg["mask_token"]) : 0;
811+
? static_cast<std::int64_t>(cfg["mask_token"])
812+
: 0;
812813
std::vector<std::int64_t> vocabulary;
813814
for (const auto& v : cfg["vocabulary"])
814815
vocabulary.push_back(static_cast<std::int64_t>(v));
@@ -1484,7 +1485,6 @@ namespace internal {
14841485
num_heads, key_dim, value_dim, use_bias, weights_and_biases);
14851486
}
14861487

1487-
14881488
inline layer_ptr create_lstm_layer(const get_param_f& get_param,
14891489
const nlohmann::json& data,
14901490
const std::string& name)
@@ -1566,9 +1566,9 @@ namespace internal {
15661566
{
15671567
nlohmann::json synthetic;
15681568
synthetic["class_name"] = cell_class == "LSTMCell" ? "LSTM"
1569-
: cell_class == "GRUCell" ? "GRU"
1570-
: cell_class == "SimpleRNNCell" ? "SimpleRNN"
1571-
: std::string("");
1569+
: cell_class == "GRUCell" ? "GRU"
1570+
: cell_class == "SimpleRNNCell" ? "SimpleRNN"
1571+
: std::string("");
15721572
synthetic["config"] = cell_config;
15731573
for (const char* key : { "return_sequences", "return_state", "go_backwards", "stateful", "unroll" }) {
15741574
if (json_obj_has_member(outer_cfg, key))

include/fdeep/layers/attention_layer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace internal {
3434
const tensor& value = input[1];
3535
const tensor& key = input.size() > 2 ? input[2] : value;
3636
const tensor scores = score_mode_ == "dot" ? transform_tensor(fplus::multiply_with(scale_),
37-
dot_product_tensors(query, transpose(key), std::vector<int>({ 2, 1 }), false))
37+
dot_product_tensors(query, transpose(key), std::vector<int>({ 2, 1 }), false))
3838
:
3939
// https://github.com/keras-team/keras/blob/v2.13.1/keras/layers/attention/attention.py
4040
transform_tensor(fplus::multiply_with(concat_score_weight_),

0 commit comments

Comments
 (0)