"git@developer.sourcefind.cn:cnjsdfcy/simbricks.git" did not exist on "d5256fe8d71a2a407e82cf75eb618c99fa63d524"
Commit 2f071fcb authored by thomwolf's avatar thomwolf
Browse files

clean up TFConv1D API

parent 57053334
...@@ -277,11 +277,11 @@ class TFPreTrainedModel(tf.keras.Model): ...@@ -277,11 +277,11 @@ class TFPreTrainedModel(tf.keras.Model):
return model return model
class TFConv1D(tf.keras.layers.Layer): class TFConv1D(tf.keras.layers.Layer):
def __init__(self, nf, nx, *inputs, initializer_range=0.02, **kwargs): def __init__(self, nf, nx, initializer_range=0.02, **kwargs):
""" TFConv1D layer as defined by Radford et al. for OpenAI GPT (and also used in GPT-2) """ TFConv1D layer as defined by Radford et al. for OpenAI GPT (and also used in GPT-2)
Basically works like a Linear layer but the weights are transposed Basically works like a Linear layer but the weights are transposed
""" """
super(TFConv1D, self).__init__(*inputs, **kwargs) super(TFConv1D, self).__init__(**kwargs)
self.nf = nf self.nf = nf
self.nx = nx self.nx = nx
self.initializer_range = initializer_range self.initializer_range = initializer_range
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment