Skip to content

Commit

Permalink
Don't export model internals publicly (#1255)
Browse files Browse the repository at this point in the history
Following our conventions, layers will be exposed standalone when they
move from `models/xx/some_layer` -> `layers/some_layer`
  • Loading branch information
mattdangerw authored Sep 21, 2023
1 parent cecbeb2 commit bc21f21
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions keras_nlp/models/xlnet/relative_attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import math
import string

from keras_nlp.api_export import keras_nlp_export
from keras_nlp.backend import keras
from keras_nlp.backend import ops

Expand Down Expand Up @@ -76,7 +75,6 @@ def _rel_shift(x, klen=-1):
return x


@keras_nlp_export("keras_nlp.layers.TwoStreamRelativeAttention")
class TwoStreamRelativeAttention(keras.layers.MultiHeadAttention):
"""Two-stream relative self-attention for XLNet.
Expand Down
2 changes: 0 additions & 2 deletions keras_nlp/models/xlnet/xlnet_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from keras_nlp.api_export import keras_nlp_export
from keras_nlp.backend import keras
from keras_nlp.backend import ops
from keras_nlp.models.xlnet.relative_attention import TwoStreamRelativeAttention
Expand All @@ -22,7 +21,6 @@ def xlnet_kernel_initializer(stddev=0.02):
return keras.initializers.TruncatedNormal(stddev=stddev)


@keras_nlp_export("keras_nlp.layers.XLNetEncoder")
class XLNetEncoder(keras.layers.Layer):
"""
XLNet Encoder.
Expand Down

0 comments on commit bc21f21

Please sign in to comment.