ganbert-pytorch icon indicating copy to clipboard operation
ganbert-pytorch copied to clipboard

Electra support

Open samanjoy2 opened this issue 1 year ago • 2 comments

Is there any way to use an electra bert model with this?

samanjoy2 avatar Jun 13 '23 00:06 samanjoy2

You should change the model specified by the variable model_name

crux82 avatar Jun 13 '23 06:06 crux82

Using model_name = 'google/electra-base-discriminator'

Gives me this error, `======== Epoch 1 / 10 ======== Training...

RuntimeError Traceback (most recent call last) in 78 # Generate the output of the Discriminator for real and fake data. 79 # First, we put together the output of the tranformer and the generator ---> 80 disciminator_input = torch.cat([hidden_states, gen_rep], dim=0) 81 # Then, we select the output of the disciminator 82 features, logits, probs = discriminator(disciminator_input)

RuntimeError: Tensors must have same number of dimensions: got 2 and 3`

samanjoy2 avatar Jun 13 '23 08:06 samanjoy2