Ejemplo n.º 1
0
 def add_matmul(self, input_a_name, input_b_name, output_name, transpose_a=False, transpose_b=False):
     layer = caffe_net.LayerParameter(name=output_name, type='MatMul',
                 bottom=[input_a_name, input_b_name], top=[output_name])
     layer.matmul_param(transpose_a, transpose_b)
     self.caffe_model.add_layer(layer)
     self.data_dict[output_name] = Operators.matmul(self.data_dict[input_a_name], transpose_a,
                                       self.data_dict[input_b_name], transpose_b, output_name)
     return output_name
Ejemplo n.º 2
0
 def add_matmul(self, input_a_name, input_b_name, output_name):
     layer = caffe_net.LayerParameter(name=output_name, type='MatMul',
                                   bottom=[input_a_name, input_b_name], top=[output_name])
     self.caffe_model.add_layer(layer)
     self.data_dict[output_name] = Operators.matmul(self.data_dict[input_a_name], self.data_dict[input_b_name], output_name)