Body: <p>Traditionally, Siamese Neural Networks have two inputs. With some tweaking, you can get them to accept any number of inputs. What I don't understand is how to get them to accept variable numbers of inputs. I've seen a couple of research papers (<a href="https://www.tandfonline.com/doi/pdf/10.1080/13658816.2018.1542698?needAccess=true" rel="nofollow noreferrer">most notably this one</a>) where they talk about doing this, but none explain exactly how.</p>
  <p>Could someone please explain how to create a Siamese Neural Network with a variable number of inputs?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-12-07T17:34:53.797Z
Comments.Text: Hello. Welcome to Artificial Intelligence Stack Exchange. Can you please provide the links to the papers that you read so far (that you don't understand)?
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-12-07T22:07:15.500Z
Comments.Text: After more research, I've found that magnet loss could present a solution. I would say more, but I can't find an implementation in keras (the framework I use) and [my question about it](https://stackoverflow.com/questions/70282894/implementation-of-magnet-loss-in-keras) is still unanswered. I'll make sure to edit this if I get a reply. I would love to combine the research done in both the [magnet loss paper](https://arxiv.org/pdf/1511.05939v2.pdf) and the [VIS-CNN paper](https://www.tandfonline.com/doi/pdf/10.1080/13658816.2018.1542698?needAccess=true), but I currently don't have the skill to
Comments.UserDisplayName: GameDungeon
Tags: <neural-networks><machine-learning><siamese-neural-network><input-layer><network-design>
Title: How can Siamese Neural Networks accept a variable number of inputs?
UserDisplayName: GameDungeon
ThreadText: # How can Siamese Neural Networks accept a variable number of inputs?
  
  (Asked by: username_0 on 2021-12-04)
  
  Traditionally, Siamese Neural Networks have two inputs. With some tweaking, you can get them to accept any number of inputs. What I don't understand is how to get them to accept variable numbers of inputs. I've seen a couple of research papers ([most notably this one](https://www.tandfonline.com/doi/pdf/10.1080/13658816.2018.1542698?needAccess=true)) where they talk about doing this, but none explain exactly how.
  
  Could someone please explain how to create a Siamese Neural Network with a variable number of inputs?
  
  **Tags:** neural-networks, machine-learning, siamese-neural-network, input-layer, network-design
  > **Comments:**
  > **username_1**: Hello. Welcome to Artificial Intelligence Stack Exchange. Can you please provide the links to the papers that you read so far (that you don't understand)?  
  > **username_0**: After more research, I've found that magnet loss could present a solution. I would say more, but I can't find an implementation in keras (the framework I use) and [my question about it](https://stackoverflow.com/questions/70282894/implementation-of-magnet-loss-in-keras) is still unanswered. I'll make sure to edit this if I get a reply. I would love to combine the research done in both the [magnet loss paper](https://arxiv.org/pdf/1511.05939v2.pdf) and the [VIS-CNN paper](https://www.tandfonline.com/doi/pdf/10.1080/13658816.2018.1542698?needAccess=true), but I currently don't have the skill to  
  
  ---
  
  ## 0 answers
  
  