no_grad_set_white_list.py 1.8 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# check no_grad_set is None
16
NOT_CHECK_OP_LIST = ['deformable_conv', 'row_conv', 'kron']
17

18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
# TODO(Shixiaowei02): Check if the items do not need fix.
# no_grad_set has value in NEED_TO_FIX_OP_LIST
# yapf: disable
NEED_TO_FIX_OP_LIST = [
    'affine_channel',
    'affine_grid',
    'backward',
    'batch_norm',
    'conv2d',
    'conv2d_transpose',
    'conv3d',
    'conv3d_transpose',
    'cos_sim',
    'cross_entropy',
    'cross_entropy2',
    'data_norm',
    'deformable_conv_v1',
    'depthwise_conv2d',
    'depthwise_conv2d_transpose',
L
liuwei1031 已提交
37
    'dot',
38 39 40 41 42 43
    'elementwise_add',
    'elementwise_div',
    'elementwise_max',
    'elementwise_min',
    'elementwise_mul',
    'elementwise_sub',
44
    'elementwise_pow',
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
    'filter_by_instag',
    'fused_elemwise_activation',
    'fused_emb_seq_pool',
    'fused_embedding_seq_pool',
    'gru_unit',
    'hierarchical_sigmoid',
    'hsigmoid',
    'huber_loss',
    'instance_norm',
    'kldiv_loss',
    'linear_chain_crf',
    'lod_reset',
    'lookup_table',
    'lookup_table_v2',
    'lstm',
    'lstmp',
    'margin_rank_loss',
    'matmul',
C
chentianyu03 已提交
63
    'matmul_v2',
64 65 66 67 68 69 70 71
    'mul',
    'multiplex',
    'rank_loss',
    'sequence_conv',
    'smooth_l1_loss',
    'spectral_norm'
]
# yapf: enable