File "names.py", line 659, in <module>
category_embedding = torch.cat([model.fc_class.weight, torch.unsqueeze(model.fc_class.bias,dim=1)],dim=1)
File "/Users/claytonnorth/opt/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 576, in __getattr__
type(self).__name__, name))
AttributeError: 'BertFineTuning' object has no attribute 'fc_class'
I was wondering if anyone else had this issue/ what is the best way to get around this ?
Here is my part 3 code
category_embedding = torch.cat([model.fc_class.weight, torch.unsqueeze(model.fc_class.bias,dim=1)],dim=1)
if args.log_dir == None:
raise ValueError('must supply --log_dir to visualize an embedding')
writer = SummaryWriter(log_dir = args.log_dir)
writer.add_embedding(
mat = category_embedding,
metadata = all_categories,
tag = 'category embedding'
)
When I run:
I was wondering if anyone else had this issue/ what is the best way to get around this ?
Here is my part 3 code