Skip to content

What is layer's interface standard in Python API ? #8370

@qingqing01

Description

@qingqing01
  1. About the name:

Some interfaces have the name, some not.

def pool2d(input,
pool_size,
pool_type,
pool_stride=None,
pool_padding=None,
global_pooling=False,
use_cudnn=True,
name=None):

def conv2d(input,
num_filters,
filter_size,
stride=None,
padding=None,
groups=None,
param_attr=None,
bias_attr=None,
use_cudnn=True,
act=None):

  1. About kwargs

Some interfaces have the **kwargs, some not.

def cos_sim(X, Y, **kwargs):
"""
This function performs the cosine similarity between two tensors
X and Y and returns that as the output.
"""

def crf_decoding(input, param_attr, label=None):
helper = LayerHelper('crf_decoding', **locals())

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions