Can you share how to install "transformer_encoder" ? I just use "pip install transformer_encoder", but got this error:
...
self.visual_transformer = TransformerEncoder(d_model=VISUAL_DIM,
TypeError: __init__() got an unexpected keyword argument 'num_layers'
Training Iteration: 0%| | 0/448 [00:00<?, ?it/s]
Traceback (most recent call last):
File "path/to/maf/MAF/Code/Trimodal-BART-driver.py", line 1359, in <module>
train(model=MODEL,
File "path/to/maf/MAF/Code/Trimodal-BART-driver.py", line 1239, in train
train_loss = train_epoch(model,
File "path/to/maf/MAF/Code/Trimodal-BART-driver.py", line 1044, in train_epoch
outputs = model(input_ids=input_ids,
File "path/to/miniconda3/envs/maf/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "path/to/maf/MAF/Code/Trimodal-BART-driver.py", line 667, in forward
outputs = self.model(
File "path/to/miniconda3/envs/maf/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "path/to/maf/MAF/Code/Trimodal-BART-driver.py", line 541, in forward
encoder_outputs = self.encoder(
File "path/to/miniconda3/envs/maf/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "path/to/maf/MAF/Code/Trimodal-BART-driver.py", line 424, in forward
acoustic_input = self.acoustic_transformer(acoustic_input)[-1]
File "path/to/miniconda3/envs/maf/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
TypeError: forward() missing 1 required positional argument: 'mask'
Hi,
Can you share how to install "transformer_encoder" ? I just use "pip install transformer_encoder", but got this error:
Problem is here:

I think these lines should be like that:

Although problem is solved, I got this:
Problem is:
I think https://github.com/guocheng18/Transformer-Encoder is not the expected library?