重构代码
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import tensorflow as tf
|
||||
|
||||
|
||||
class NoMask(tf.keras.layers.Layer):
|
||||
def __init__(self, **kwargs):
|
||||
super(NoMask, self).__init__(**kwargs)
|
||||
|
||||
def build(self, input_shape):
|
||||
# Be sure to call this somewhere!
|
||||
super(NoMask, self).build(input_shape)
|
||||
|
||||
def call(self, x, mask=None, **kwargs):
|
||||
return x
|
||||
|
||||
def compute_mask(self, inputs, mask):
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user