diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index 6a217774f772777b3b86f7508f6108d512dadc12..28f2ae7d986f3db36898d203b7b8110d96d13572 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -9647,9 +9647,6 @@ def sequence_mask(x, maxlen=None, dtype='int64', name=None): mask = layers.sequence_mask(x=x) """ - assert not in_dygraph_mode(), ( - "sequence layer is not supported in dygraph mode yet.") - helper = LayerHelper('sequence_mask', **locals()) if name is None: out = helper.create_variable_for_type_inference(dtype=dtype)