Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
1f8b5c2b
P
Paddle-Lite
项目概览
PaddlePaddle
/
Paddle-Lite
通知
331
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
271
列表
看板
标记
里程碑
合并请求
78
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle-Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
271
Issue
271
列表
看板
标记
里程碑
合并请求
78
合并请求
78
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
1f8b5c2b
编写于
3月 31, 2020
作者:
H
huzhiqiang
提交者:
GitHub
3月 31, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[operator] add InferShapeImpl method (#3294)
上级
f81db03a
变更
243
展开全部
隐藏空白更改
内联
并排
Showing
243 changed file
with
517 addition
and
502 deletion
+517
-502
lite/core/op_lite.cc
lite/core/op_lite.cc
+55
-0
lite/core/op_lite.h
lite/core/op_lite.h
+14
-6
lite/core/program.cc
lite/core/program.cc
+1
-2
lite/operators/activation_grad_ops.cc
lite/operators/activation_grad_ops.cc
+1
-1
lite/operators/activation_grad_ops.h
lite/operators/activation_grad_ops.h
+1
-1
lite/operators/activation_ops.cc
lite/operators/activation_ops.cc
+1
-1
lite/operators/activation_ops.h
lite/operators/activation_ops.h
+1
-1
lite/operators/affine_channel_op.cc
lite/operators/affine_channel_op.cc
+1
-1
lite/operators/affine_channel_op.h
lite/operators/affine_channel_op.h
+1
-1
lite/operators/anchor_generator_op.cc
lite/operators/anchor_generator_op.cc
+1
-1
lite/operators/anchor_generator_op.h
lite/operators/anchor_generator_op.h
+1
-1
lite/operators/argmax_op.cc
lite/operators/argmax_op.cc
+1
-1
lite/operators/argmax_op.h
lite/operators/argmax_op.h
+1
-1
lite/operators/assign_op.cc
lite/operators/assign_op.cc
+1
-1
lite/operators/assign_op.h
lite/operators/assign_op.h
+1
-1
lite/operators/assign_value_op.cc
lite/operators/assign_value_op.cc
+1
-1
lite/operators/assign_value_op.h
lite/operators/assign_value_op.h
+1
-1
lite/operators/attention_padding_mask_op.cc
lite/operators/attention_padding_mask_op.cc
+1
-1
lite/operators/attention_padding_mask_op.h
lite/operators/attention_padding_mask_op.h
+1
-1
lite/operators/axpy_op.cc
lite/operators/axpy_op.cc
+1
-1
lite/operators/axpy_op.h
lite/operators/axpy_op.h
+1
-1
lite/operators/batch_norm_op.cc
lite/operators/batch_norm_op.cc
+1
-1
lite/operators/batch_norm_op.h
lite/operators/batch_norm_op.h
+1
-1
lite/operators/beam_search_decode_op.cc
lite/operators/beam_search_decode_op.cc
+1
-1
lite/operators/beam_search_decode_op.h
lite/operators/beam_search_decode_op.h
+1
-1
lite/operators/beam_search_op.cc
lite/operators/beam_search_op.cc
+1
-1
lite/operators/beam_search_op.h
lite/operators/beam_search_op.h
+1
-1
lite/operators/box_clip_op.cc
lite/operators/box_clip_op.cc
+1
-1
lite/operators/box_clip_op.h
lite/operators/box_clip_op.h
+1
-1
lite/operators/box_coder_op.cc
lite/operators/box_coder_op.cc
+1
-1
lite/operators/box_coder_op.h
lite/operators/box_coder_op.h
+1
-1
lite/operators/calib_op.cc
lite/operators/calib_op.cc
+1
-1
lite/operators/calib_op.h
lite/operators/calib_op.h
+1
-1
lite/operators/cast_op.cc
lite/operators/cast_op.cc
+1
-1
lite/operators/cast_op.h
lite/operators/cast_op.h
+1
-1
lite/operators/collect_fpn_proposals_op.cc
lite/operators/collect_fpn_proposals_op.cc
+1
-1
lite/operators/collect_fpn_proposals_op.h
lite/operators/collect_fpn_proposals_op.h
+1
-1
lite/operators/compare_op.cc
lite/operators/compare_op.cc
+1
-1
lite/operators/compare_op.h
lite/operators/compare_op.h
+1
-1
lite/operators/concat_op.cc
lite/operators/concat_op.cc
+1
-1
lite/operators/concat_op.h
lite/operators/concat_op.h
+1
-1
lite/operators/conditional_block_op.cc
lite/operators/conditional_block_op.cc
+1
-1
lite/operators/conditional_block_op.h
lite/operators/conditional_block_op.h
+1
-1
lite/operators/conv_op.cc
lite/operators/conv_op.cc
+1
-29
lite/operators/conv_op.h
lite/operators/conv_op.h
+1
-3
lite/operators/conv_transpose_op.cc
lite/operators/conv_transpose_op.cc
+1
-1
lite/operators/conv_transpose_op.h
lite/operators/conv_transpose_op.h
+1
-1
lite/operators/crf_decoding_op.cc
lite/operators/crf_decoding_op.cc
+1
-1
lite/operators/crf_decoding_op.h
lite/operators/crf_decoding_op.h
+1
-1
lite/operators/crop_op.cc
lite/operators/crop_op.cc
+1
-1
lite/operators/crop_op.h
lite/operators/crop_op.h
+1
-1
lite/operators/decode_bboxes_op.cc
lite/operators/decode_bboxes_op.cc
+1
-1
lite/operators/decode_bboxes_op.h
lite/operators/decode_bboxes_op.h
+1
-1
lite/operators/density_prior_box_op.cc
lite/operators/density_prior_box_op.cc
+1
-1
lite/operators/density_prior_box_op.h
lite/operators/density_prior_box_op.h
+1
-1
lite/operators/distribute_fpn_proposals_op.cc
lite/operators/distribute_fpn_proposals_op.cc
+1
-1
lite/operators/distribute_fpn_proposals_op.h
lite/operators/distribute_fpn_proposals_op.h
+1
-1
lite/operators/dropout_op.cc
lite/operators/dropout_op.cc
+1
-1
lite/operators/dropout_op.h
lite/operators/dropout_op.h
+1
-1
lite/operators/elementwise_grad_ops.cc
lite/operators/elementwise_grad_ops.cc
+1
-1
lite/operators/elementwise_grad_ops.h
lite/operators/elementwise_grad_ops.h
+1
-1
lite/operators/elementwise_ops.cc
lite/operators/elementwise_ops.cc
+2
-33
lite/operators/elementwise_ops.h
lite/operators/elementwise_ops.h
+2
-3
lite/operators/expand_op.cc
lite/operators/expand_op.cc
+1
-1
lite/operators/expand_op.h
lite/operators/expand_op.h
+1
-1
lite/operators/fake_channel_wise_dequantize_max_abs.h
lite/operators/fake_channel_wise_dequantize_max_abs.h
+1
-1
lite/operators/fake_dequantize_max_abs.h
lite/operators/fake_dequantize_max_abs.h
+1
-1
lite/operators/fake_quantize_dequantize_moving_avg_max_abs.h
lite/operators/fake_quantize_dequantize_moving_avg_max_abs.h
+1
-1
lite/operators/fake_quantize_moving_avg_max_abs.h
lite/operators/fake_quantize_moving_avg_max_abs.h
+1
-1
lite/operators/fake_quantize_range_abs_max.h
lite/operators/fake_quantize_range_abs_max.h
+1
-1
lite/operators/fc_op.cc
lite/operators/fc_op.cc
+1
-28
lite/operators/fc_op.h
lite/operators/fc_op.h
+1
-2
lite/operators/feed_op.cc
lite/operators/feed_op.cc
+1
-1
lite/operators/fetch_op.cc
lite/operators/fetch_op.cc
+1
-1
lite/operators/fill_constant_batch_size_like_op.cc
lite/operators/fill_constant_batch_size_like_op.cc
+1
-1
lite/operators/fill_constant_batch_size_like_op.h
lite/operators/fill_constant_batch_size_like_op.h
+1
-1
lite/operators/fill_constant_op.cc
lite/operators/fill_constant_op.cc
+1
-1
lite/operators/fill_constant_op.h
lite/operators/fill_constant_op.h
+1
-1
lite/operators/flatten_op.cc
lite/operators/flatten_op.cc
+3
-3
lite/operators/flatten_op.h
lite/operators/flatten_op.h
+2
-2
lite/operators/fusion_elementwise_activation_ops.cc
lite/operators/fusion_elementwise_activation_ops.cc
+2
-2
lite/operators/fusion_elementwise_activation_ops.h
lite/operators/fusion_elementwise_activation_ops.h
+2
-2
lite/operators/gather_op.cc
lite/operators/gather_op.cc
+1
-1
lite/operators/gather_op.h
lite/operators/gather_op.h
+1
-1
lite/operators/generate_proposals_op.cc
lite/operators/generate_proposals_op.cc
+1
-1
lite/operators/generate_proposals_op.h
lite/operators/generate_proposals_op.h
+1
-1
lite/operators/grid_sampler_op.cc
lite/operators/grid_sampler_op.cc
+1
-1
lite/operators/grid_sampler_op.h
lite/operators/grid_sampler_op.h
+1
-1
lite/operators/gru_op.cc
lite/operators/gru_op.cc
+1
-1
lite/operators/gru_op.h
lite/operators/gru_op.h
+1
-1
lite/operators/gru_unit_op.cc
lite/operators/gru_unit_op.cc
+1
-1
lite/operators/gru_unit_op.h
lite/operators/gru_unit_op.h
+1
-1
lite/operators/im2sequence_op.cc
lite/operators/im2sequence_op.cc
+1
-1
lite/operators/im2sequence_op.h
lite/operators/im2sequence_op.h
+1
-1
lite/operators/increment_op.cc
lite/operators/increment_op.cc
+1
-1
lite/operators/increment_op.h
lite/operators/increment_op.h
+1
-1
lite/operators/instance_norm_op.cc
lite/operators/instance_norm_op.cc
+1
-1
lite/operators/instance_norm_op.h
lite/operators/instance_norm_op.h
+1
-1
lite/operators/interpolate_op.cc
lite/operators/interpolate_op.cc
+1
-1
lite/operators/interpolate_op.h
lite/operators/interpolate_op.h
+1
-1
lite/operators/io_copy_op.cc
lite/operators/io_copy_op.cc
+1
-1
lite/operators/io_copy_op.h
lite/operators/io_copy_op.h
+1
-1
lite/operators/is_empty_op.cc
lite/operators/is_empty_op.cc
+1
-1
lite/operators/is_empty_op.h
lite/operators/is_empty_op.h
+1
-1
lite/operators/layer_norm_op.cc
lite/operators/layer_norm_op.cc
+1
-1
lite/operators/layer_norm_op.h
lite/operators/layer_norm_op.h
+1
-1
lite/operators/layout_op.cc
lite/operators/layout_op.cc
+1
-1
lite/operators/layout_op.h
lite/operators/layout_op.h
+1
-1
lite/operators/lod_reset_op.cc
lite/operators/lod_reset_op.cc
+1
-1
lite/operators/lod_reset_op.h
lite/operators/lod_reset_op.h
+1
-1
lite/operators/logical_op.cc
lite/operators/logical_op.cc
+2
-2
lite/operators/logical_op.h
lite/operators/logical_op.h
+2
-2
lite/operators/lookup_table_dequant_op.cc
lite/operators/lookup_table_dequant_op.cc
+1
-1
lite/operators/lookup_table_dequant_op.h
lite/operators/lookup_table_dequant_op.h
+1
-1
lite/operators/lookup_table_op.cc
lite/operators/lookup_table_op.cc
+1
-1
lite/operators/lookup_table_op.h
lite/operators/lookup_table_op.h
+1
-1
lite/operators/lookup_table_v2_op.cc
lite/operators/lookup_table_v2_op.cc
+1
-1
lite/operators/lookup_table_v2_op.h
lite/operators/lookup_table_v2_op.h
+1
-1
lite/operators/lrn_op.cc
lite/operators/lrn_op.cc
+1
-1
lite/operators/lrn_op.h
lite/operators/lrn_op.h
+1
-1
lite/operators/lstm_op.cc
lite/operators/lstm_op.cc
+1
-1
lite/operators/lstm_op.h
lite/operators/lstm_op.h
+1
-1
lite/operators/match_matrix_tensor_op.cc
lite/operators/match_matrix_tensor_op.cc
+1
-1
lite/operators/match_matrix_tensor_op.h
lite/operators/match_matrix_tensor_op.h
+1
-1
lite/operators/matmul_op.cc
lite/operators/matmul_op.cc
+1
-1
lite/operators/matmul_op.h
lite/operators/matmul_op.h
+1
-1
lite/operators/mean_grad_op.cc
lite/operators/mean_grad_op.cc
+1
-1
lite/operators/mean_grad_op.h
lite/operators/mean_grad_op.h
+1
-1
lite/operators/mean_op.cc
lite/operators/mean_op.cc
+1
-1
lite/operators/mean_op.h
lite/operators/mean_op.h
+1
-1
lite/operators/merge_lod_tensor_op.cc
lite/operators/merge_lod_tensor_op.cc
+1
-1
lite/operators/merge_lod_tensor_op.h
lite/operators/merge_lod_tensor_op.h
+1
-1
lite/operators/mul_grad_op.cc
lite/operators/mul_grad_op.cc
+1
-1
lite/operators/mul_grad_op.h
lite/operators/mul_grad_op.h
+1
-1
lite/operators/mul_op.cc
lite/operators/mul_op.cc
+1
-1
lite/operators/mul_op.h
lite/operators/mul_op.h
+1
-1
lite/operators/multiclass_nms_op.cc
lite/operators/multiclass_nms_op.cc
+1
-1
lite/operators/multiclass_nms_op.h
lite/operators/multiclass_nms_op.h
+1
-1
lite/operators/negative_op.cc
lite/operators/negative_op.cc
+1
-1
lite/operators/negative_op.h
lite/operators/negative_op.h
+1
-1
lite/operators/norm_op.cc
lite/operators/norm_op.cc
+1
-1
lite/operators/norm_op.h
lite/operators/norm_op.h
+1
-1
lite/operators/op_params.h
lite/operators/op_params.h
+188
-116
lite/operators/pad2d_op.cc
lite/operators/pad2d_op.cc
+1
-1
lite/operators/pad2d_op.h
lite/operators/pad2d_op.h
+1
-1
lite/operators/pool_op.cc
lite/operators/pool_op.cc
+1
-1
lite/operators/pool_op.h
lite/operators/pool_op.h
+1
-1
lite/operators/power_op.cc
lite/operators/power_op.cc
+1
-1
lite/operators/power_op.h
lite/operators/power_op.h
+1
-1
lite/operators/prior_box_op.cc
lite/operators/prior_box_op.cc
+1
-1
lite/operators/prior_box_op.h
lite/operators/prior_box_op.h
+1
-1
lite/operators/range_op.cc
lite/operators/range_op.cc
+1
-1
lite/operators/range_op.h
lite/operators/range_op.h
+1
-1
lite/operators/read_from_array_op.cc
lite/operators/read_from_array_op.cc
+1
-1
lite/operators/read_from_array_op.h
lite/operators/read_from_array_op.h
+1
-1
lite/operators/reduce_max_op.cc
lite/operators/reduce_max_op.cc
+1
-1
lite/operators/reduce_max_op.h
lite/operators/reduce_max_op.h
+1
-1
lite/operators/reduce_mean_op.cc
lite/operators/reduce_mean_op.cc
+1
-1
lite/operators/reduce_mean_op.h
lite/operators/reduce_mean_op.h
+1
-1
lite/operators/reduce_ops.cc
lite/operators/reduce_ops.cc
+1
-1
lite/operators/reduce_ops.h
lite/operators/reduce_ops.h
+1
-1
lite/operators/reduce_prod_op.cc
lite/operators/reduce_prod_op.cc
+1
-1
lite/operators/reduce_prod_op.h
lite/operators/reduce_prod_op.h
+1
-1
lite/operators/relu_op.cc
lite/operators/relu_op.cc
+1
-1
lite/operators/relu_op.h
lite/operators/relu_op.h
+1
-1
lite/operators/reshape_op.cc
lite/operators/reshape_op.cc
+3
-3
lite/operators/reshape_op.h
lite/operators/reshape_op.h
+2
-2
lite/operators/roi_align_op.cc
lite/operators/roi_align_op.cc
+1
-1
lite/operators/roi_align_op.h
lite/operators/roi_align_op.h
+1
-1
lite/operators/scale_op.cc
lite/operators/scale_op.cc
+1
-1
lite/operators/scale_op.h
lite/operators/scale_op.h
+1
-1
lite/operators/search_aligned_mat_mul_op.cc
lite/operators/search_aligned_mat_mul_op.cc
+1
-1
lite/operators/search_aligned_mat_mul_op.h
lite/operators/search_aligned_mat_mul_op.h
+1
-1
lite/operators/search_fc_op.cc
lite/operators/search_fc_op.cc
+1
-1
lite/operators/search_fc_op.h
lite/operators/search_fc_op.h
+1
-1
lite/operators/search_grnn_op.cc
lite/operators/search_grnn_op.cc
+1
-1
lite/operators/search_grnn_op.h
lite/operators/search_grnn_op.h
+1
-1
lite/operators/search_group_padding_op.cc
lite/operators/search_group_padding_op.cc
+1
-1
lite/operators/search_group_padding_op.h
lite/operators/search_group_padding_op.h
+1
-1
lite/operators/search_seq_depadding_op.cc
lite/operators/search_seq_depadding_op.cc
+1
-1
lite/operators/search_seq_depadding_op.h
lite/operators/search_seq_depadding_op.h
+1
-1
lite/operators/search_seq_fc_op.cc
lite/operators/search_seq_fc_op.cc
+1
-1
lite/operators/search_seq_fc_op.h
lite/operators/search_seq_fc_op.h
+1
-1
lite/operators/search_seq_softmax_op.cc
lite/operators/search_seq_softmax_op.cc
+1
-1
lite/operators/search_seq_softmax_op.h
lite/operators/search_seq_softmax_op.h
+1
-1
lite/operators/sequence_arithmetic_op.cc
lite/operators/sequence_arithmetic_op.cc
+1
-1
lite/operators/sequence_arithmetic_op.h
lite/operators/sequence_arithmetic_op.h
+1
-1
lite/operators/sequence_concat_op.cc
lite/operators/sequence_concat_op.cc
+1
-1
lite/operators/sequence_concat_op.h
lite/operators/sequence_concat_op.h
+1
-1
lite/operators/sequence_conv_op.cc
lite/operators/sequence_conv_op.cc
+1
-1
lite/operators/sequence_conv_op.h
lite/operators/sequence_conv_op.h
+1
-1
lite/operators/sequence_expand_as_op.cc
lite/operators/sequence_expand_as_op.cc
+1
-1
lite/operators/sequence_expand_as_op.h
lite/operators/sequence_expand_as_op.h
+1
-1
lite/operators/sequence_expand_op.cc
lite/operators/sequence_expand_op.cc
+1
-1
lite/operators/sequence_expand_op.h
lite/operators/sequence_expand_op.h
+1
-1
lite/operators/sequence_pool_concat_op.cc
lite/operators/sequence_pool_concat_op.cc
+1
-1
lite/operators/sequence_pool_concat_op.h
lite/operators/sequence_pool_concat_op.h
+1
-1
lite/operators/sequence_pool_op.cc
lite/operators/sequence_pool_op.cc
+1
-1
lite/operators/sequence_pool_op.h
lite/operators/sequence_pool_op.h
+1
-1
lite/operators/sequence_reshape_op.cc
lite/operators/sequence_reshape_op.cc
+1
-1
lite/operators/sequence_reshape_op.h
lite/operators/sequence_reshape_op.h
+1
-1
lite/operators/sequence_reverse_op.cc
lite/operators/sequence_reverse_op.cc
+1
-1
lite/operators/sequence_reverse_op.h
lite/operators/sequence_reverse_op.h
+1
-1
lite/operators/sequence_softmax_op.cc
lite/operators/sequence_softmax_op.cc
+1
-1
lite/operators/sequence_softmax_op.h
lite/operators/sequence_softmax_op.h
+1
-1
lite/operators/sequence_topk_avg_pooling_op.cc
lite/operators/sequence_topk_avg_pooling_op.cc
+1
-1
lite/operators/sequence_topk_avg_pooling_op.h
lite/operators/sequence_topk_avg_pooling_op.h
+1
-1
lite/operators/sgd_op.cc
lite/operators/sgd_op.cc
+1
-1
lite/operators/sgd_op.h
lite/operators/sgd_op.h
+1
-1
lite/operators/shape_op.cc
lite/operators/shape_op.cc
+1
-1
lite/operators/shape_op.h
lite/operators/shape_op.h
+1
-1
lite/operators/shuffle_channel_op.cc
lite/operators/shuffle_channel_op.cc
+1
-1
lite/operators/shuffle_channel_op.h
lite/operators/shuffle_channel_op.h
+1
-1
lite/operators/slice_op.cc
lite/operators/slice_op.cc
+1
-1
lite/operators/slice_op.h
lite/operators/slice_op.h
+1
-1
lite/operators/softmax_op.cc
lite/operators/softmax_op.cc
+1
-29
lite/operators/softmax_op.h
lite/operators/softmax_op.h
+1
-2
lite/operators/split_lod_tensor_op.cc
lite/operators/split_lod_tensor_op.cc
+1
-1
lite/operators/split_lod_tensor_op.h
lite/operators/split_lod_tensor_op.h
+1
-1
lite/operators/split_op.cc
lite/operators/split_op.cc
+1
-1
lite/operators/split_op.h
lite/operators/split_op.h
+1
-1
lite/operators/squeeze_op.cc
lite/operators/squeeze_op.cc
+3
-3
lite/operators/squeeze_op.h
lite/operators/squeeze_op.h
+2
-2
lite/operators/stack_op.cc
lite/operators/stack_op.cc
+1
-1
lite/operators/stack_op.h
lite/operators/stack_op.h
+1
-1
lite/operators/subgraph_op.cc
lite/operators/subgraph_op.cc
+1
-1
lite/operators/subgraph_op.h
lite/operators/subgraph_op.h
+1
-1
lite/operators/topk_op.cc
lite/operators/topk_op.cc
+1
-1
lite/operators/topk_op.h
lite/operators/topk_op.h
+1
-1
lite/operators/transpose_op.cc
lite/operators/transpose_op.cc
+2
-2
lite/operators/transpose_op.h
lite/operators/transpose_op.h
+2
-2
lite/operators/uniform_random_op.cc
lite/operators/uniform_random_op.cc
+1
-1
lite/operators/uniform_random_op.h
lite/operators/uniform_random_op.h
+1
-1
lite/operators/unsqueeze_op.cc
lite/operators/unsqueeze_op.cc
+3
-3
lite/operators/unsqueeze_op.h
lite/operators/unsqueeze_op.h
+2
-2
lite/operators/var_conv_2d_op.cc
lite/operators/var_conv_2d_op.cc
+1
-1
lite/operators/var_conv_2d_op.h
lite/operators/var_conv_2d_op.h
+1
-1
lite/operators/while_op.cc
lite/operators/while_op.cc
+1
-1
lite/operators/while_op.h
lite/operators/while_op.h
+1
-1
lite/operators/write_to_array_op.cc
lite/operators/write_to_array_op.cc
+1
-1
lite/operators/write_to_array_op.h
lite/operators/write_to_array_op.h
+1
-1
lite/operators/yolo_box_op.cc
lite/operators/yolo_box_op.cc
+1
-1
lite/operators/yolo_box_op.h
lite/operators/yolo_box_op.h
+1
-1
未找到文件。
lite/core/op_lite.cc
浏览文件 @
1f8b5c2b
...
...
@@ -22,6 +22,61 @@
namespace
paddle
{
namespace
lite
{
bool
OpLite
::
InferShape
()
{
// if input_tensor_ptrs and output_tensor_ptrs are overloaded in param_
// InferShapeByMemoryInternal will be applied.
if
(
param_
.
input_tensor_ptrs
()
&&
param_
.
output_tensor_ptrs
())
{
return
this
->
InferShapeWithCache
();
}
else
{
// otherwise, InferShapeImpl is applied directly.
return
this
->
InferShapeImpl
();
}
}
bool
OpLite
::
InferShapeWithCache
()
{
// 1. Get vector of current input tensors
auto
*
current_inputs
=
param_
.
input_tensor_ptrs
();
// 2. Get hash value of current inputs shape and lod
size_t
new_hash
=
0
;
for
(
auto
iter
=
current_inputs
->
begin
();
iter
!=
current_inputs
->
end
();
iter
++
)
{
// combined dims value into new_hash value.
auto
&
element_dims
=
(
*
iter
)
->
dims
();
for
(
int
i
=
0
;
i
<
element_dims
.
size
();
i
++
)
{
new_hash
=
lite
::
hash_combine
(
new_hash
,
static_cast
<
int
>
(
element_dims
[
i
]));
}
// combine lod value into new_hash valud.
auto
&
emement_lods
=
(
*
iter
)
->
lod
();
for
(
auto
lod_iter
=
emement_lods
.
begin
();
lod_iter
!=
emement_lods
.
end
();
lod_iter
++
)
{
for
(
int
i
=
0
;
i
<
lod_iter
->
size
();
i
++
)
{
new_hash
=
lite
::
hash_combine
(
new_hash
,
static_cast
<
int
>
(
lod_iter
->
at
(
i
)));
}
}
}
// 3. infer shapes of output tensors
if
(
new_hash
==
io_shape_lod_hash_
&&
new_hash
!=
0
)
{
// if current hash value is consistent with io_shape_lod_hash_,
// previous outputs shape and lod are reused.
auto
*
current_outputs
=
param_
.
output_tensor_ptrs
();
for
(
int
i
=
0
;
i
<
current_outputs
->
size
();
i
++
)
{
current_outputs
->
at
(
i
)
->
Resize
(
last_output_shapes
[
i
]);
current_outputs
->
at
(
i
)
->
set_lod
(
last_output_lods
[
i
]);
}
}
else
{
// otherwise, current hash value is changed, InferShapeImpl will apply.
io_shape_lod_hash_
=
new_hash
;
this
->
InferShapeImpl
();
auto
*
current_outputs
=
param_
.
output_tensor_ptrs
();
for
(
int
i
=
0
;
i
<
current_outputs
->
size
();
i
++
)
{
last_output_shapes
[
i
]
=
current_outputs
->
at
(
i
)
->
dims
();
last_output_lods
[
i
]
=
current_outputs
->
at
(
i
)
->
lod
();
}
}
return
true
;
}
std
::
vector
<
std
::
unique_ptr
<
KernelBase
>>
OpLite
::
CreateKernels
(
const
std
::
vector
<
Place
>
&
places
,
const
std
::
string
&
kernel_type
)
{
std
::
vector
<
std
::
unique_ptr
<
KernelBase
>>
kernels
;
...
...
lite/core/op_lite.h
浏览文件 @
1f8b5c2b
...
...
@@ -14,6 +14,7 @@
#pragma once
#include <functional>
#include <list>
#include <map>
#include <memory>
...
...
@@ -24,6 +25,7 @@
#include "lite/core/kernel.h"
#include "lite/core/scope.h"
#include "lite/model_parser/cpp/op_desc.h"
#include "lite/operators/op_params.h"
namespace
paddle
{
namespace
lite
{
...
...
@@ -64,8 +66,8 @@ class OpLite : public Registry {
// Check the shape.
virtual
bool
CheckShape
()
const
{
return
true
;
}
// Inference the outputs' shape.
virtual
bool
InferShape
()
const
{
return
true
;
}
virtual
bool
SmartInferShape
()
{
return
this
->
InferShape
();
}
virtual
bool
InferShape
Impl
()
const
{
return
true
;
}
virtual
bool
InferShape
();
// Run this operator.
virtual
bool
Run
();
// Indicate whether the Op runs only once or not
...
...
@@ -151,10 +153,16 @@ class OpLite : public Registry {
std
::
vector
<
Place
>
valid_places_
;
Place
kernel_place_
{
TARGET
(
kHost
),
PRECISION
(
kFloat
)};
std
::
unique_ptr
<
OpInfo
>
op_info_
;
std
::
vector
<
DDimLite
>
last_input_shapes
;
std
::
vector
<
DDimLite
>
last_output_shapes
;
std
::
vector
<
std
::
vector
<
std
::
vector
<
uint64_t
>>>
last_output_lods
;
std
::
vector
<
std
::
vector
<
std
::
vector
<
uint64_t
>>>
last_input_lods
;
std
::
vector
<
DDimLite
>
last_output_shapes
{};
std
::
vector
<
std
::
vector
<
std
::
vector
<
uint64_t
>>>
last_output_lods
{};
size_t
io_shape_lod_hash_
{};
mutable
operators
::
ParamBase
param_
;
private:
// Infer Shape according to memory, if current input shapes are consistent
// with that of previous inputs, output shapes of last time will be reused.
bool
InferShapeWithCache
();
};
/*
...
...
lite/core/program.cc
浏览文件 @
1f8b5c2b
...
...
@@ -286,8 +286,7 @@ void Instruction::Run() {
return
;
}
// op_->InferShape();
op_
->
SmartInferShape
();
op_
->
InferShape
();
kernel_
->
Launch
();
has_run_
=
true
;
}
...
...
lite/operators/activation_grad_ops.cc
浏览文件 @
1f8b5c2b
...
...
@@ -25,7 +25,7 @@ bool ActivationGradOp::CheckShape() const {
return
true
;
}
bool
ActivationGradOp
::
InferShape
()
const
{
bool
ActivationGradOp
::
InferShape
Impl
()
const
{
param_
.
X_grad
->
Resize
(
param_
.
Out_grad
->
dims
());
return
true
;
}
...
...
lite/operators/activation_grad_ops.h
浏览文件 @
1f8b5c2b
...
...
@@ -26,7 +26,7 @@ class ActivationGradOp : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/activation_ops.cc
浏览文件 @
1f8b5c2b
...
...
@@ -25,7 +25,7 @@ bool ActivationOp::CheckShape() const {
return
true
;
}
bool
ActivationOp
::
InferShape
()
const
{
bool
ActivationOp
::
InferShape
Impl
()
const
{
param_
.
Out
->
Resize
(
param_
.
X
->
dims
());
auto
out_lod
=
param_
.
Out
->
mutable_lod
();
*
out_lod
=
param_
.
X
->
lod
();
...
...
lite/operators/activation_ops.h
浏览文件 @
1f8b5c2b
...
...
@@ -26,7 +26,7 @@ class ActivationOp : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/affine_channel_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -44,7 +44,7 @@ bool AffineChannelOpLite::CheckShape() const {
return
true
;
}
bool
AffineChannelOpLite
::
InferShape
()
const
{
bool
AffineChannelOpLite
::
InferShape
Impl
()
const
{
const
auto
x_dims
=
param_
.
X
->
dims
();
param_
.
Out
->
Resize
(
x_dims
);
return
true
;
...
...
lite/operators/affine_channel_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -31,7 +31,7 @@ class AffineChannelOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/anchor_generator_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -31,7 +31,7 @@ bool AnchorGeneratorOpLite::CheckShape() const {
return
true
;
}
bool
AnchorGeneratorOpLite
::
InferShape
()
const
{
bool
AnchorGeneratorOpLite
::
InferShape
Impl
()
const
{
auto
input_dims
=
param_
.
Input
->
dims
();
size_t
num_anchors
=
param_
.
aspect_ratios
.
size
()
*
param_
.
anchor_sizes
.
size
();
std
::
vector
<
int64_t
>
output_shape
(
...
...
lite/operators/anchor_generator_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -32,7 +32,7 @@ class AnchorGeneratorOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/argmax_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -29,7 +29,7 @@ bool ArgmaxOpLite::CheckShape() const {
return
true
;
}
bool
ArgmaxOpLite
::
InferShape
()
const
{
bool
ArgmaxOpLite
::
InferShape
Impl
()
const
{
auto
x_dims
=
param_
.
X
->
dims
();
int
x_rank
=
x_dims
.
size
();
int
axis
=
param_
.
Axis
;
...
...
lite/operators/argmax_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -31,7 +31,7 @@ class ArgmaxOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/assign_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -26,7 +26,7 @@ bool AssignOpLite::CheckShape() const {
return
true
;
}
bool
AssignOpLite
::
InferShape
()
const
{
bool
AssignOpLite
::
InferShape
Impl
()
const
{
lite
::
DDim
input_dims
;
input_dims
=
param_
.
X
->
dims
();
param_
.
Out
->
Resize
(
lite
::
DDim
(
input_dims
));
...
...
lite/operators/assign_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -30,7 +30,7 @@ class AssignOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/assign_value_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -35,7 +35,7 @@ bool AssignValueOpLite::CheckShape() const {
return
true
;
}
bool
AssignValueOpLite
::
InferShape
()
const
{
bool
AssignValueOpLite
::
InferShape
Impl
()
const
{
std
::
vector
<
int
>
shape
=
param_
.
shape
;
std
::
vector
<
int64_t
>
out_shape
;
for
(
size_t
i
=
0
;
i
<
shape
.
size
();
i
++
)
out_shape
.
push_back
(
shape
[
i
]);
...
...
lite/operators/assign_value_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -31,7 +31,7 @@ class AssignValueOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/attention_padding_mask_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -28,7 +28,7 @@ bool AttentionPaddingMaskOp::CheckShape() const {
return
true
;
}
bool
AttentionPaddingMaskOp
::
InferShape
()
const
{
bool
AttentionPaddingMaskOp
::
InferShape
Impl
()
const
{
auto
src_len
=
param_
.
X
->
lod
()[
0
][
1
];
CHECK_EQ
(
src_len
,
param_
.
X
->
dims
()[
1
])
<<
"Mismatch source length, expect: "
<<
src_len
...
...
lite/operators/attention_padding_mask_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -29,7 +29,7 @@ class AttentionPaddingMaskOp : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/axpy_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -34,7 +34,7 @@ bool AxpyOpLite::CheckShape() const {
return
true
;
}
bool
AxpyOpLite
::
InferShape
()
const
{
bool
AxpyOpLite
::
InferShape
Impl
()
const
{
auto
dims
=
param_
.
Bias
->
dims
();
// Set output dims
...
...
lite/operators/axpy_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -31,7 +31,7 @@ class AxpyOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/batch_norm_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -46,7 +46,7 @@ bool BatchNormOp::CheckShape() const {
return
true
;
}
bool
BatchNormOp
::
InferShape
()
const
{
bool
BatchNormOp
::
InferShape
Impl
()
const
{
auto
x_dims
=
param_
.
x
->
dims
();
int64_t
channel_size
=
0
;
switch
(
param_
.
data_layout
)
{
...
...
lite/operators/batch_norm_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -30,7 +30,7 @@ class BatchNormOp : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/beam_search_decode_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -28,7 +28,7 @@ bool BeamSearchDecodeOpLite::CheckShape() const {
return
true
;
}
bool
BeamSearchDecodeOpLite
::
InferShape
()
const
{
return
true
;
}
bool
BeamSearchDecodeOpLite
::
InferShape
Impl
()
const
{
return
true
;
}
bool
BeamSearchDecodeOpLite
::
AttachImpl
(
const
cpp
::
OpDesc
&
op_desc
,
lite
::
Scope
*
scope
)
{
...
...
lite/operators/beam_search_decode_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -31,7 +31,7 @@ class BeamSearchDecodeOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/beam_search_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -30,7 +30,7 @@ bool BeamSearchOp::CheckShape() const {
return
true
;
}
bool
BeamSearchOp
::
InferShape
()
const
{
return
true
;
}
bool
BeamSearchOp
::
InferShape
Impl
()
const
{
return
true
;
}
bool
BeamSearchOp
::
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
{
param_
.
pre_ids
=
scope
->
FindTensor
(
opdesc
.
Input
(
"pre_ids"
).
front
());
...
...
lite/operators/beam_search_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -30,7 +30,7 @@ class BeamSearchOp : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/box_clip_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -35,7 +35,7 @@ bool BoxClipOpLite::CheckShape() const {
return
true
;
}
bool
BoxClipOpLite
::
InferShape
()
const
{
bool
BoxClipOpLite
::
InferShape
Impl
()
const
{
auto
*
input
=
param_
.
Input
;
auto
*
output
=
param_
.
Output
;
output
->
Resize
(
input
->
dims
());
...
...
lite/operators/box_clip_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -31,7 +31,7 @@ class BoxClipOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/box_coder_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -35,7 +35,7 @@ bool BoxCoderOpLite::CheckShape() const {
return
true
;
}
bool
BoxCoderOpLite
::
InferShape
()
const
{
bool
BoxCoderOpLite
::
InferShape
Impl
()
const
{
auto
prior_box_dims
=
param_
.
prior_box
->
dims
();
auto
target_box_dims
=
param_
.
target_box
->
dims
();
std
::
string
code_type
=
param_
.
code_type
;
...
...
lite/operators/box_coder_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -29,7 +29,7 @@ class BoxCoderOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/calib_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -24,7 +24,7 @@ bool CalibOpLite::CheckShape() const {
CHECK_OR_FALSE
(
param_
.
output
);
return
true
;
}
bool
CalibOpLite
::
InferShape
()
const
{
bool
CalibOpLite
::
InferShape
Impl
()
const
{
param_
.
output
->
Resize
(
param_
.
input
->
dims
());
return
true
;
}
...
...
lite/operators/calib_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -42,7 +42,7 @@ class CalibOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
);
...
...
lite/operators/cast_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -25,7 +25,7 @@ bool CastOp::CheckShape() const {
return
true
;
}
bool
CastOp
::
InferShape
()
const
{
bool
CastOp
::
InferShape
Impl
()
const
{
CHECK_OR_FALSE
(
param_
.
Out
);
// TODO(Superjomn) Enable data sharing.
auto
out_dims
=
param_
.
X
->
dims
();
...
...
lite/operators/cast_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -30,7 +30,7 @@ class CastOp : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/collect_fpn_proposals_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -43,7 +43,7 @@ bool CollectFpnProposalsOpLite::CheckShape() const {
return
true
;
}
bool
CollectFpnProposalsOpLite
::
InferShape
()
const
{
bool
CollectFpnProposalsOpLite
::
InferShape
Impl
()
const
{
param_
.
fpn_rois
->
Resize
({
param_
.
post_nms_topN
,
4
});
return
true
;
...
...
lite/operators/collect_fpn_proposals_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -32,7 +32,7 @@ class CollectFpnProposalsOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/compare_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -26,7 +26,7 @@ bool CompareOp::CheckShape() const {
return
true
;
}
bool
CompareOp
::
InferShape
()
const
{
bool
CompareOp
::
InferShape
Impl
()
const
{
CHECK_OR_FALSE
(
param_
.
Out
);
// TODO(Superjomn) Enable data sharing.
auto
input_dims
=
param_
.
X
->
dims
();
...
...
lite/operators/compare_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -30,7 +30,7 @@ class CompareOp : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/concat_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -26,7 +26,7 @@ bool ConcatOpLite::CheckShape() const {
return
true
;
}
bool
ConcatOpLite
::
InferShape
()
const
{
bool
ConcatOpLite
::
InferShape
Impl
()
const
{
const
std
::
vector
<
Tensor
*>
&
inputs
=
param_
.
x
;
const
size_t
n
=
inputs
.
size
();
CHECK_GT_OR_FALSE
(
n
,
0
);
...
...
lite/operators/concat_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -30,7 +30,7 @@ class ConcatOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/conditional_block_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -27,7 +27,7 @@ bool ConditionalBlockOpLite::CheckShape() const {
return
true
;
}
bool
ConditionalBlockOpLite
::
InferShape
()
const
{
return
true
;
}
bool
ConditionalBlockOpLite
::
InferShape
Impl
()
const
{
return
true
;
}
bool
ConditionalBlockOpLite
::
AttachImpl
(
const
cpp
::
OpDesc
&
op_desc
,
lite
::
Scope
*
scope
)
{
...
...
lite/operators/conditional_block_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -31,7 +31,7 @@ class ConditionalBlockOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/conv_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -80,35 +80,7 @@ void UpdatePaddingAndDilation(std::vector<int>* paddings,
}
}
bool
ConvOpLite
::
SmartInferShape
()
{
if
(
!
last_input_shapes
.
empty
())
{
if
(
last_input_shapes
[
0
]
==
param_
.
x
->
dims
()
&&
last_input_lods
[
0
]
==
param_
.
x
->
lod
())
{
param_
.
output
->
Resize
(
last_output_shapes
[
0
]);
param_
.
output
->
set_lod
(
last_output_lods
[
0
]);
return
true
;
}
}
this
->
InferShape
();
if
(
!
last_input_shapes
.
empty
())
{
last_input_shapes
.
clear
();
last_input_lods
.
clear
();
}
last_input_shapes
.
push_back
(
param_
.
x
->
dims
());
last_input_lods
.
push_back
(
param_
.
x
->
lod
());
if
(
!
last_output_shapes
.
empty
())
{
last_output_shapes
.
clear
();
last_output_lods
.
clear
();
}
last_output_shapes
.
push_back
(
param_
.
output
->
dims
());
last_output_lods
.
push_back
(
param_
.
output
->
lod
());
return
true
;
}
bool
ConvOpLite
::
InferShape
()
const
{
bool
ConvOpLite
::
InferShapeImpl
()
const
{
const
auto
in_dims
=
param_
.
x
->
dims
();
const
auto
filter_dims
=
param_
.
filter
->
dims
();
...
...
lite/operators/conv_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -34,9 +34,7 @@ class ConvOpLite : public OpLite {
explicit
ConvOpLite
(
const
std
::
string
&
type
)
:
OpLite
(
type
)
{}
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
SmartInferShape
()
override
;
bool
InferShapeImpl
()
const
override
;
// TODO(Superjomn) replace framework::OpDesc with a lite one.
bool
AttachImpl
(
const
cpp
::
OpDesc
&
op_desc
,
lite
::
Scope
*
scope
)
override
{
...
...
lite/operators/conv_transpose_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -52,7 +52,7 @@ inline int ConvTransposeOutputSize(int input_size,
return
output_size
;
}
bool
ConvTransposeOpLite
::
InferShape
()
const
{
bool
ConvTransposeOpLite
::
InferShape
Impl
()
const
{
const
auto
in_dims
=
param_
.
x
->
dims
();
const
auto
filter_dims
=
param_
.
filter
->
dims
();
...
...
lite/operators/conv_transpose_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -34,7 +34,7 @@ class ConvTransposeOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/crf_decoding_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -60,7 +60,7 @@ bool CrfDecodingOpLite::CheckShape() const {
return
true
;
}
bool
CrfDecodingOpLite
::
InferShape
()
const
{
bool
CrfDecodingOpLite
::
InferShape
Impl
()
const
{
auto
emission_dims
=
param_
.
emission
->
dims
();
if
(
param_
.
length
==
nullptr
)
{
param_
.
viterbi_path
->
Resize
({
emission_dims
[
0
],
1
});
...
...
lite/operators/crf_decoding_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -31,7 +31,7 @@ class CrfDecodingOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/crop_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -26,7 +26,7 @@ bool CropOpLite::CheckShape() const {
return
true
;
}
bool
CropOpLite
::
InferShape
()
const
{
bool
CropOpLite
::
InferShape
Impl
()
const
{
// nchw
auto
x_dims
=
param_
.
X
->
dims
();
lite
::
DDim
output_shape
(
x_dims
);
...
...
lite/operators/crop_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -30,7 +30,7 @@ class CropOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/decode_bboxes_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -29,7 +29,7 @@ bool DecodeBboxesOpLite::CheckShape() const {
return
true
;
}
bool
DecodeBboxesOpLite
::
InferShape
()
const
{
bool
DecodeBboxesOpLite
::
InferShape
Impl
()
const
{
param_
.
bbox_data
->
Resize
(
param_
.
loc_data
->
dims
());
return
true
;
}
...
...
lite/operators/decode_bboxes_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -29,7 +29,7 @@ class DecodeBboxesOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/density_prior_box_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -27,7 +27,7 @@ bool DensityPriorBoxOpLite::CheckShape() const {
return
true
;
}
bool
DensityPriorBoxOpLite
::
InferShape
()
const
{
return
true
;
}
bool
DensityPriorBoxOpLite
::
InferShape
Impl
()
const
{
return
true
;
}
bool
DensityPriorBoxOpLite
::
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
{
...
...
lite/operators/density_prior_box_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -30,7 +30,7 @@ class DensityPriorBoxOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/distribute_fpn_proposals_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -32,7 +32,7 @@ bool DistributeFpnProposalsOpLite::CheckShape() const {
return
true
;
}
bool
DistributeFpnProposalsOpLite
::
InferShape
()
const
{
bool
DistributeFpnProposalsOpLite
::
InferShape
Impl
()
const
{
int
num_out_rois
=
param_
.
max_level
-
param_
.
min_level
+
1
;
for
(
int
i
=
0
;
i
<
num_out_rois
;
i
++
)
{
param_
.
multi_fpn_rois
[
i
]
->
Resize
({
-
1
,
4
});
...
...
lite/operators/distribute_fpn_proposals_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -32,7 +32,7 @@ class DistributeFpnProposalsOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/dropout_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -26,7 +26,7 @@ bool DropoutOp::CheckShape() const {
return
true
;
}
bool
DropoutOp
::
InferShape
()
const
{
bool
DropoutOp
::
InferShape
Impl
()
const
{
const
auto
x_dims
=
param_
.
x
->
dims
();
param_
.
output
->
Resize
(
x_dims
);
if
(
param_
.
is_test
==
false
)
{
...
...
lite/operators/dropout_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -28,7 +28,7 @@ class DropoutOp : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
void
AttachKernel
(
KernelBase
*
kernel
)
override
{
kernel
->
SetParam
(
param_
);
}
// TODO(Superjomn) replace framework::OpDesc with a lite one.
...
...
lite/operators/elementwise_grad_ops.cc
浏览文件 @
1f8b5c2b
...
...
@@ -26,7 +26,7 @@ bool ElementwiseGradOp::CheckShape() const {
return
true
;
}
bool
ElementwiseGradOp
::
InferShape
()
const
{
bool
ElementwiseGradOp
::
InferShape
Impl
()
const
{
auto
x_dim
=
param_
.
X
->
dims
();
auto
y_dim
=
param_
.
Y
->
dims
();
if
(
param_
.
XGrad
)
{
...
...
lite/operators/elementwise_grad_ops.h
浏览文件 @
1f8b5c2b
...
...
@@ -27,7 +27,7 @@ class ElementwiseGradOp : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/elementwise_ops.cc
浏览文件 @
1f8b5c2b
...
...
@@ -26,39 +26,8 @@ bool ElementwiseOp::CheckShape() const {
CHECK_OR_FALSE
(
param_
.
Out
);
return
true
;
}
bool
ElementwiseOp
::
SmartInferShape
()
{
if
(
!
last_input_shapes
.
empty
())
{
if
(
last_input_shapes
[
0
]
==
param_
.
X
->
dims
()
&&
last_input_shapes
[
1
]
==
param_
.
Y
->
dims
()
&&
last_input_lods
[
0
]
==
param_
.
X
->
lod
()
&&
last_input_lods
[
1
]
==
param_
.
Y
->
lod
())
{
param_
.
Out
->
Resize
(
last_output_shapes
[
0
]);
param_
.
Out
->
set_lod
(
last_output_lods
[
0
]);
return
true
;
}
}
this
->
InferShape
();
if
(
!
last_input_shapes
.
empty
())
{
last_input_shapes
.
clear
();
last_input_lods
.
clear
();
}
last_input_shapes
.
push_back
(
param_
.
X
->
dims
());
last_input_lods
.
push_back
(
param_
.
X
->
lod
());
last_input_shapes
.
push_back
(
param_
.
Y
->
dims
());
last_input_lods
.
push_back
(
param_
.
Y
->
lod
());
if
(
!
last_output_shapes
.
empty
())
{
last_output_shapes
.
clear
();
last_output_lods
.
clear
();
}
last_output_shapes
.
push_back
(
param_
.
Out
->
dims
());
last_output_lods
.
push_back
(
param_
.
Out
->
lod
());
return
true
;
}
bool
ElementwiseOp
::
InferShape
()
const
{
bool
ElementwiseOp
::
InferShapeImpl
()
const
{
auto
x_dim
=
param_
.
X
->
dims
();
auto
y_dim
=
param_
.
Y
->
dims
();
if
(
x_dim
==
y_dim
)
{
...
...
@@ -136,7 +105,7 @@ bool ElementwiseOp::AttachImpl(const cpp::OpDesc& opdesc, lite::Scope* scope) {
// return true;
//}
// bool ElementwiseGradExplicitOp::InferShape() const {
// bool ElementwiseGradExplicitOp::InferShape
Impl
() const {
// param_.X_grad->Resize(param_.Out_grad->dims());
// if (param_.Y_grad) param_.Y_grad->Resize(param_.Y->dims());
// return true;
...
...
lite/operators/elementwise_ops.h
浏览文件 @
1f8b5c2b
...
...
@@ -27,8 +27,7 @@ class ElementwiseOp : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
SmartInferShape
()
override
;
bool
InferShapeImpl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
@@ -48,7 +47,7 @@ class ElementwiseOp : public OpLite {
// bool CheckShape() const override;
// bool InferShape() const override;
// bool InferShape
Impl
() const override;
// bool AttachImpl(const cpp::OpDesc& opdesc, lite::Scope* scope) override;
...
...
lite/operators/expand_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -32,7 +32,7 @@ bool ExpandOpLite::CheckShape() const {
return
true
;
}
bool
ExpandOpLite
::
InferShape
()
const
{
bool
ExpandOpLite
::
InferShape
Impl
()
const
{
DDim
out_dims
(
param_
.
X
->
dims
());
for
(
size_t
i
=
0
;
i
<
param_
.
expand_times
.
size
();
++
i
)
{
out_dims
[
i
]
*=
param_
.
expand_times
[
i
];
...
...
lite/operators/expand_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -28,7 +28,7 @@ class ExpandOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/fake_channel_wise_dequantize_max_abs.h
浏览文件 @
1f8b5c2b
...
...
@@ -36,7 +36,7 @@ class FakeChannelWiseDequantizeMaxAbsOpLite : public OpLite {
bool
CheckShape
()
const
override
{
return
true
;
}
bool
InferShape
()
const
override
{
return
true
;
}
bool
InferShape
Impl
()
const
override
{
return
true
;
}
bool
AttachImpl
(
const
cpp
::
OpDesc
&
op_desc
,
lite
::
Scope
*
scope
)
override
{
auto
x
=
op_desc
.
Input
(
"X"
).
front
();
...
...
lite/operators/fake_dequantize_max_abs.h
浏览文件 @
1f8b5c2b
...
...
@@ -35,7 +35,7 @@ class FakeDequantizeMaxAbsOpLite : public OpLite {
bool
CheckShape
()
const
override
{
return
true
;
}
bool
InferShape
()
const
override
{
return
true
;
}
bool
InferShape
Impl
()
const
override
{
return
true
;
}
bool
AttachImpl
(
const
cpp
::
OpDesc
&
op_desc
,
lite
::
Scope
*
scope
)
override
{
auto
x
=
op_desc
.
Input
(
"X"
).
front
();
...
...
lite/operators/fake_quantize_dequantize_moving_avg_max_abs.h
浏览文件 @
1f8b5c2b
...
...
@@ -36,7 +36,7 @@ class FakeQuantizeDequantizeMovingAvgMaxAbsOpLite : public OpLite {
bool
CheckShape
()
const
override
{
return
true
;
}
bool
InferShape
()
const
override
{
return
true
;
}
bool
InferShape
Impl
()
const
override
{
return
true
;
}
bool
AttachImpl
(
const
cpp
::
OpDesc
&
op_desc
,
lite
::
Scope
*
scope
)
override
{
auto
x
=
op_desc
.
Input
(
"X"
).
front
();
...
...
lite/operators/fake_quantize_moving_avg_max_abs.h
浏览文件 @
1f8b5c2b
...
...
@@ -36,7 +36,7 @@ class FakeQuantizeMovingAvgMaxAbsOpLite : public OpLite {
bool
CheckShape
()
const
override
{
return
true
;
}
bool
InferShape
()
const
override
{
return
true
;
}
bool
InferShape
Impl
()
const
override
{
return
true
;
}
bool
AttachImpl
(
const
cpp
::
OpDesc
&
op_desc
,
lite
::
Scope
*
scope
)
override
{
auto
x
=
op_desc
.
Input
(
"X"
).
front
();
...
...
lite/operators/fake_quantize_range_abs_max.h
浏览文件 @
1f8b5c2b
...
...
@@ -36,7 +36,7 @@ class FakeQuantizeRangeMaxAbsOpLite : public OpLite {
bool
CheckShape
()
const
override
{
return
true
;
}
bool
InferShape
()
const
override
{
return
true
;
}
bool
InferShape
Impl
()
const
override
{
return
true
;
}
bool
AttachImpl
(
const
cpp
::
OpDesc
&
op_desc
,
lite
::
Scope
*
scope
)
override
{
auto
x
=
op_desc
.
Input
(
"X"
).
front
();
...
...
lite/operators/fc_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -48,34 +48,7 @@ bool FcOpLite::CheckShape() const {
return
true
;
}
bool
FcOpLite
::
SmartInferShape
()
{
if
(
!
last_input_shapes
.
empty
()
&&
!
last_output_shapes
.
empty
())
{
if
(
last_input_shapes
[
0
]
==
param_
.
input
->
dims
()
&&
last_input_lods
[
0
]
==
param_
.
input
->
lod
())
{
param_
.
output
->
Resize
(
last_output_shapes
[
0
]);
param_
.
output
->
set_lod
(
last_output_lods
[
0
]);
return
true
;
}
}
this
->
InferShape
();
if
(
!
last_input_shapes
.
empty
())
{
last_input_shapes
.
clear
();
last_input_lods
.
clear
();
}
last_input_shapes
.
push_back
(
param_
.
input
->
dims
());
last_input_lods
.
push_back
(
param_
.
input
->
lod
());
if
(
!
last_output_shapes
.
empty
())
{
last_output_shapes
.
clear
();
last_output_lods
.
clear
();
}
last_output_shapes
.
push_back
(
param_
.
output
->
dims
());
last_output_lods
.
push_back
(
param_
.
output
->
lod
());
return
true
;
}
bool
FcOpLite
::
InferShape
()
const
{
bool
FcOpLite
::
InferShapeImpl
()
const
{
const
auto
&
input_dims
=
param_
.
input
->
dims
();
const
auto
&
w_dims
=
param_
.
w
->
dims
();
int
in_num_col_dims
=
param_
.
in_num_col_dims
;
...
...
lite/operators/fc_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -35,8 +35,7 @@ class FcOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
SmartInferShape
()
override
;
bool
InferShapeImpl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
op_desc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/feed_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -29,7 +29,7 @@ class FeedOp : public OpLite {
return
true
;
}
bool
InferShape
()
const
override
{
return
true
;
}
bool
InferShape
Impl
()
const
override
{
return
true
;
}
void
AttachKernel
(
KernelBase
*
kernel
)
override
{
kernel
->
SetParam
(
param_
);
}
...
...
lite/operators/fetch_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -29,7 +29,7 @@ class FetchOp : public OpLite {
return
true
;
}
bool
InferShape
()
const
override
{
return
true
;
}
bool
InferShape
Impl
()
const
override
{
return
true
;
}
void
AttachKernel
(
KernelBase
*
kernel
)
override
{
kernel
->
SetParam
(
param_
);
}
protected:
...
...
lite/operators/fill_constant_batch_size_like_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -28,7 +28,7 @@ bool FillConstantBatchSizeLikeOp::CheckShape() const {
return
true
;
}
bool
FillConstantBatchSizeLikeOp
::
InferShape
()
const
{
bool
FillConstantBatchSizeLikeOp
::
InferShape
Impl
()
const
{
std
::
vector
<
int64_t
>
output_dim
{
param_
.
shape
.
begin
(),
param_
.
shape
.
end
()};
if
(
param_
.
input_dim_idx
==
0
&&
!
param_
.
input
->
lod
().
empty
())
{
output_dim
[
param_
.
output_dim_idx
]
=
param_
.
input
->
lod
().
back
().
size
()
-
1
;
...
...
lite/operators/fill_constant_batch_size_like_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -32,7 +32,7 @@ class FillConstantBatchSizeLikeOp : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/fill_constant_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -24,7 +24,7 @@ bool FillConstantOp::CheckShape() const {
return
true
;
}
bool
FillConstantOp
::
InferShape
()
const
{
bool
FillConstantOp
::
InferShape
Impl
()
const
{
std
::
vector
<
int64_t
>
out_shape
;
auto
shape_tensor
=
param_
.
shape_tensor
;
auto
shape_tensor_list
=
param_
.
shape_tensor_list
;
...
...
lite/operators/fill_constant_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -31,7 +31,7 @@ class FillConstantOp : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/flatten_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -25,7 +25,7 @@ bool FlattenOp::CheckShape() const {
return
true
;
}
bool
FlattenOp
::
InferShape
()
const
{
bool
FlattenOp
::
InferShape
Impl
()
const
{
auto
x_dims
=
param_
.
x
->
dims
();
auto
out_lod
=
param_
.
output
->
mutable_lod
();
...
...
@@ -71,8 +71,8 @@ bool Flatten2Op::CheckShape() const {
return
true
;
}
bool
Flatten2Op
::
InferShape
()
const
{
FlattenOp
::
InferShape
();
bool
Flatten2Op
::
InferShape
Impl
()
const
{
FlattenOp
::
InferShape
Impl
();
auto
x_dims
=
param_
.
x
->
dims
();
std
::
vector
<
DDim
::
value_type
>
xshape_dims
(
x_dims
.
size
()
+
1
,
0
);
for
(
size_t
i
=
0
;
i
<
x_dims
.
size
();
i
++
)
{
...
...
lite/operators/flatten_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -30,7 +30,7 @@ class FlattenOp : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
@@ -49,7 +49,7 @@ class Flatten2Op : public FlattenOp {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/fusion_elementwise_activation_ops.cc
浏览文件 @
1f8b5c2b
...
...
@@ -27,7 +27,7 @@ bool FusionElementwiseActivationOp::CheckShape() const {
return
true
;
}
bool
FusionElementwiseActivationOp
::
InferShape
()
const
{
bool
FusionElementwiseActivationOp
::
InferShape
Impl
()
const
{
CHECK_OR_FALSE
(
param_
.
X
->
dims
().
size
()
>=
param_
.
Y
->
dims
().
size
());
param_
.
Out
->
Resize
(
param_
.
X
->
dims
());
return
true
;
...
...
@@ -59,7 +59,7 @@ bool FusionElementwiseActivationOp::AttachImpl(const cpp::OpDesc& opdesc,
// return true;
// }
// bool FusionElementwiseActivationGradExplicitOp::InferShape() const {
// bool FusionElementwiseActivationGradExplicitOp::InferShape
Impl
() const {
// param_.X_grad->Resize(param_.Out_grad->dims());
// param_.Y_grad->Resize(param_.Y->dims());
// return true;
...
...
lite/operators/fusion_elementwise_activation_ops.h
浏览文件 @
1f8b5c2b
...
...
@@ -29,7 +29,7 @@ class FusionElementwiseActivationOp : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
@@ -51,7 +51,7 @@ class FusionElementwiseActivationOp : public OpLite {
// bool CheckShape() const override;
// bool InferShape() const override;
// bool InferShape
Impl
() const override;
// bool AttachImpl(const cpp::OpDesc& opdesc, lite::Scope* scope) override;
...
...
lite/operators/gather_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -26,7 +26,7 @@ bool GatherOp::CheckShape() const {
return
true
;
}
bool
GatherOp
::
InferShape
()
const
{
bool
GatherOp
::
InferShape
Impl
()
const
{
auto
index_dims
=
param_
.
Index
->
dims
();
CHECK
(
index_dims
.
size
()
==
1
||
(
index_dims
.
size
()
==
2
&&
index_dims
[
1
]
==
1
))
...
...
lite/operators/gather_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -30,7 +30,7 @@ class GatherOp : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/generate_proposals_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -43,7 +43,7 @@ bool GenerateProposalsOpLite::CheckShape() const {
return
true
;
}
bool
GenerateProposalsOpLite
::
InferShape
()
const
{
bool
GenerateProposalsOpLite
::
InferShape
Impl
()
const
{
param_
.
RpnRois
->
Resize
(
std
::
vector
<
int64_t
>
({
-
1
,
4
}));
param_
.
RpnRoiProbs
->
Resize
(
std
::
vector
<
int64_t
>
({
-
1
,
1
}));
return
true
;
...
...
lite/operators/generate_proposals_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -32,7 +32,7 @@ class GenerateProposalsOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/grid_sampler_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -42,7 +42,7 @@ bool GridSamplerOp::CheckShape() const {
return
true
;
}
bool
GridSamplerOp
::
InferShape
()
const
{
bool
GridSamplerOp
::
InferShape
Impl
()
const
{
auto
x_dims
=
param_
.
x
->
dims
();
param_
.
out
->
Resize
(
x_dims
);
return
true
;
...
...
lite/operators/grid_sampler_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -31,7 +31,7 @@ class GridSamplerOp : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/gru_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -51,7 +51,7 @@ bool GRUOpLite::CheckShape() const {
return
true
;
}
bool
GRUOpLite
::
InferShape
()
const
{
bool
GRUOpLite
::
InferShape
Impl
()
const
{
const
auto
&
input_dims
=
param_
.
input
->
dims
();
const
auto
&
weight_dims
=
param_
.
weight
->
dims
();
int
frame_size
=
weight_dims
[
0
];
...
...
lite/operators/gru_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -30,7 +30,7 @@ class GRUOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/gru_unit_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -51,7 +51,7 @@ bool GRUUnitOpLite::CheckShape() const {
return
true
;
}
bool
GRUUnitOpLite
::
InferShape
()
const
{
bool
GRUUnitOpLite
::
InferShape
Impl
()
const
{
auto
input_dims
=
param_
.
input
->
dims
();
auto
hidden_prev_dims
=
param_
.
hidden_prev
->
dims
();
auto
weight_dims
=
param_
.
weight
->
dims
();
...
...
lite/operators/gru_unit_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -30,7 +30,7 @@ class GRUUnitOpLite : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/im2sequence_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -26,7 +26,7 @@ inline int Im2SeqOutputSize(
}
bool
Im2SequenceOp
::
CheckShape
()
const
{
return
true
;
}
bool
Im2SequenceOp
::
InferShape
()
const
{
bool
Im2SequenceOp
::
InferShape
Impl
()
const
{
CHECK_OR_FALSE
(
param_
.
Out
);
// TODO(Superjomn) Enable data sharing.
auto
input_dims
=
param_
.
X
->
dims
();
...
...
lite/operators/im2sequence_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -30,7 +30,7 @@ class Im2SequenceOp : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/increment_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -25,7 +25,7 @@ bool IncrementOp::CheckShape() const {
return
true
;
}
bool
IncrementOp
::
InferShape
()
const
{
bool
IncrementOp
::
InferShape
Impl
()
const
{
CHECK_OR_FALSE
(
param_
.
Out
);
// TODO(Superjomn) Enable data sharing.
auto
out_dims
=
param_
.
X
->
dims
();
...
...
lite/operators/increment_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -30,7 +30,7 @@ class IncrementOp : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/instance_norm_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -42,7 +42,7 @@ bool InstanceNormOp::CheckShape() const {
return
true
;
}
bool
InstanceNormOp
::
InferShape
()
const
{
bool
InstanceNormOp
::
InferShape
Impl
()
const
{
auto
x_dims
=
param_
.
x
->
dims
();
int64_t
batch_size
=
x_dims
[
0
];
int64_t
channel_size
=
x_dims
[
1
];
...
...
lite/operators/instance_norm_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -31,7 +31,7 @@ class InstanceNormOp : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/interpolate_op.cc
浏览文件 @
1f8b5c2b
...
...
@@ -34,7 +34,7 @@ bool InterpolateOp::CheckShape() const {
return
true
;
}
bool
InterpolateOp
::
InferShape
()
const
{
bool
InterpolateOp
::
InferShape
Impl
()
const
{
auto
X
=
param_
.
X
;
int
n
=
X
->
dims
()[
0
];
...
...
lite/operators/interpolate_op.h
浏览文件 @
1f8b5c2b
...
...
@@ -31,7 +31,7 @@ class InterpolateOp : public OpLite {
bool
CheckShape
()
const
override
;
bool
InferShape
()
const
override
;
bool
InferShape
Impl
()
const
override
;
bool
AttachImpl
(
const
cpp
::
OpDesc
&
opdesc
,
lite
::
Scope
*
scope
)
override
;
...
...
lite/operators/io_copy_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/io_copy_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/is_empty_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/is_empty_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/layer_norm_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/layer_norm_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/layout_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/layout_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/lod_reset_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/lod_reset_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/logical_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/logical_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/lookup_table_dequant_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/lookup_table_dequant_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/lookup_table_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/lookup_table_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/lookup_table_v2_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/lookup_table_v2_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/lrn_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/lrn_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/lstm_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/lstm_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/match_matrix_tensor_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/match_matrix_tensor_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/matmul_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/matmul_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/mean_grad_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/mean_grad_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/mean_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/mean_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/merge_lod_tensor_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/merge_lod_tensor_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/mul_grad_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/mul_grad_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/mul_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/mul_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/multiclass_nms_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/multiclass_nms_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/negative_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/negative_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/norm_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/norm_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/op_params.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/pad2d_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/pad2d_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/pool_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/pool_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/power_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/power_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/prior_box_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/prior_box_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/range_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/range_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/read_from_array_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/read_from_array_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/reduce_max_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/reduce_max_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/reduce_mean_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/reduce_mean_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/reduce_ops.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/reduce_ops.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/reduce_prod_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/reduce_prod_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/relu_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/relu_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/reshape_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/reshape_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/roi_align_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/roi_align_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/scale_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/scale_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/search_aligned_mat_mul_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/search_aligned_mat_mul_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/search_fc_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/search_fc_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/search_grnn_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/search_grnn_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/search_group_padding_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/search_group_padding_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/search_seq_depadding_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/search_seq_depadding_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/search_seq_fc_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/search_seq_fc_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/search_seq_softmax_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/search_seq_softmax_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sequence_arithmetic_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sequence_arithmetic_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sequence_concat_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sequence_concat_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sequence_conv_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sequence_conv_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sequence_expand_as_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sequence_expand_as_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sequence_expand_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sequence_expand_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sequence_pool_concat_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sequence_pool_concat_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sequence_pool_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sequence_pool_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sequence_reshape_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sequence_reshape_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sequence_reverse_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sequence_reverse_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sequence_softmax_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sequence_softmax_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sequence_topk_avg_pooling_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sequence_topk_avg_pooling_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sgd_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/sgd_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/shape_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/shape_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/shuffle_channel_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/shuffle_channel_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/slice_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/slice_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/softmax_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/softmax_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/split_lod_tensor_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/split_lod_tensor_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/split_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/split_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/squeeze_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/squeeze_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/stack_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/stack_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/subgraph_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/subgraph_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/topk_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/topk_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/transpose_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/transpose_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/uniform_random_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/uniform_random_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/unsqueeze_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/unsqueeze_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/var_conv_2d_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/var_conv_2d_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/while_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/while_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/write_to_array_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/write_to_array_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/yolo_box_op.cc
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
lite/operators/yolo_box_op.h
浏览文件 @
1f8b5c2b
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录