Caffe2 - Python API
A deep learning, cross platform ML framework
array_helpers.py
1 ## @package arra_helpers
2 # Module caffe2.python.helpers.array_helpers
3 from __future__ import absolute_import
4 from __future__ import division
5 from __future__ import print_function
6 from __future__ import unicode_literals
7 
8 
9 def concat(model, blobs_in, blob_out, **kwargs):
10  """Depth Concat."""
11  if kwargs.get('order') and kwargs.get('axis'):
12  # The backend throws an error if both are given
13  kwargs.pop('order')
14 
15  return model.net.Concat(
16  blobs_in,
17  [blob_out, "_" + blob_out + "_concat_dims"],
18  **kwargs
19  )[0]
20 
21 
22 def depth_concat(model, blobs_in, blob_out, **kwargs):
23  """The old depth concat function - we should move to use concat."""
24  print("DepthConcat is deprecated. use Concat instead.")
25  return concat(blobs_in, blob_out, **kwargs)
Module caffe2.python.layers.concat.