Skip to content

Commit

Permalink
Fix C++ syntax for or, relevant for Visual Studio
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobiasd committed Sep 20, 2023
1 parent c37a798 commit 2c280db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/fdeep/layers/additive_attention_layer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class additive_attention_layer : public layer
protected:
tensors apply_impl(const tensors& input) const override
{
assertion(input.size() == 2 or input.size() == 3, "Invalid number of inputs for Attention layer.");
assertion(input.size() == 2 || input.size() == 3, "Invalid number of inputs for Attention layer.");
const tensor& query = input[0];
const tensor& value = input[1];
const tensor& key = input.size() > 2 ? input[2] : value;
Expand Down
2 changes: 1 addition & 1 deletion include/fdeep/layers/attention_layer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class attention_layer : public layer
protected:
tensors apply_impl(const tensors& input) const override
{
assertion(input.size() == 2 or input.size() == 3, "Invalid number of inputs for Attention layer.");
assertion(input.size() == 2 || input.size() == 3, "Invalid number of inputs for Attention layer.");
const tensor& query = input[0];
const tensor& value = input[1];
const tensor& key = input.size() > 2 ? input[2] : value;
Expand Down

0 comments on commit 2c280db

Please sign in to comment.