コード例 #1
0
 def Setup(self, bottom):
     super(CropLayer, self).Setup(bottom)
     self._param['shape_like'] = bottom[1]
     return ops.Crop(bottom[0], **self._param)
コード例 #2
0
ファイル: common.py プロジェクト: yyaqi/Dragon
 def LayerSetup(self, bottom):
     if not isinstance(bottom, (tuple, list)) or len(bottom) != 2:
         raise ValueError('Excepted two bottom blobs.')
     self.arguments['shape_like'] = bottom[1]
     self.arguments['starts'] = self.arguments['sizes'] = None
     return _ops.Crop(bottom[0], **self.arguments)
コード例 #3
0
ファイル: common.py プロジェクト: windowxiaoming/Dragon
 def Setup(self, bottom):
     super(CropLayer, self).Setup(bottom)
     self._param['shape_like'] = bottom[1]
     self._param['starts'] = self._param['ends'] = None
     return ops.Crop(bottom[0], **self._param)