Every line of 'pytorch concatenate' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
638 def concatenate(inputs, axis=-1, **kwargs): 639 """Functional interface to the `Concatenate` layer. 640 641 # Arguments 642 inputs: A list of input tensors (at least 2). 643 axis: Concatenation axis. 644 **kwargs: Standard layer keyword arguments. 645 646 # Returns 647 A tensor, the concatenation of the inputs alongside axis `axis`. 648 """ 649 return Concatenate(axis=axis, **kwargs)(inputs)
20 def concat(x): 21 x = list(x) 22 if len(x) == 0: 23 return None 24 if len(x) == 1: 25 return x[0] 26 return T.concatenate(x, axis=1)
124 def concatenate(seq, axis=0, out=None): 125 # XXX(nkoep): Why do we cast to float32 instead of float64 here? 126 seq = [cast(t, float32) for t in seq] 127 return torch.cat(seq, dim=axis, out=out)
109 def forward(self, *inputs): 110 return torch.cat(inputs, dim=self.dim)