simplifying the model
This commit is contained in:
parent
b22060fbdc
commit
a35f4e76df
|
|
@ -81,6 +81,8 @@ def main(opt):
|
||||||
phi, num_authors=A.size, pad_index=pad_index, pad_length=opt.pad, device=device
|
phi, num_authors=A.size, pad_index=pad_index, pad_length=opt.pad, device=device
|
||||||
)
|
)
|
||||||
|
|
||||||
|
print(cls)
|
||||||
|
|
||||||
if opt.name == 'auto':
|
if opt.name == 'auto':
|
||||||
method = f'{phi.__class__.__name__}_alpha{opt.alpha}'
|
method = f'{phi.__class__.__name__}_alpha{opt.alpha}'
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,11 @@ class AuthorshipAttributionClassifier(nn.Module):
|
||||||
def __init__(self, projector, num_authors, pad_index, pad_length=500, device='cpu'):
|
def __init__(self, projector, num_authors, pad_index, pad_length=500, device='cpu'):
|
||||||
super(AuthorshipAttributionClassifier, self).__init__()
|
super(AuthorshipAttributionClassifier, self).__init__()
|
||||||
self.projector = projector.to(device)
|
self.projector = projector.to(device)
|
||||||
|
#self.ff = FFProjection(input_size=projector.space_dimensions(),
|
||||||
|
# hidden_sizes=[1024],
|
||||||
|
# output_size=num_authors).to(device)
|
||||||
self.ff = FFProjection(input_size=projector.space_dimensions(),
|
self.ff = FFProjection(input_size=projector.space_dimensions(),
|
||||||
hidden_sizes=[1024],
|
hidden_sizes=[],
|
||||||
output_size=num_authors).to(device)
|
output_size=num_authors).to(device)
|
||||||
self.padder = Padding(pad_index=pad_index, max_length=pad_length, dynamic=True, pad_at_end=False, device=device)
|
self.padder = Padding(pad_index=pad_index, max_length=pad_length, dynamic=True, pad_at_end=False, device=device)
|
||||||
self.device = device
|
self.device = device
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue