File size: 2,419 Bytes
2ad102c
 
 
80af1e9
cffb46b
80af1e9
cffb46b
 
 
80af1e9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
license: mit
---

# FIDNetV3 from LayoutDM

[FIDNetV3](https://github.com/CyberAgentAILab/layout-dm/blob/main/src/trainer/trainer/fid/model.py#L123-L180) from [LayoutDM](https://github.com/CyberAgentAILab/layout-dm)

```python
from transformers import AutoModel

model = AutoModel.from_pretrained("shunk031/layoutdm-fidnet-v3-publaynet", trust_remote_code=True)
print(model)
# LayoutDmFIDNetV3(
#   (emb_label): Embedding(5, 256)
#   (fc_bbox): Linear(in_features=4, out_features=256, bias=True)
#   (enc_fc_in): Linear(in_features=512, out_features=256, bias=True)
#   (enc_transformer): TransformerWithToken(
#     (core): TransformerEncoder(
#       (layers): ModuleList(
#         (0-3): 4 x TransformerEncoderLayer(
#           (self_attn): MultiheadAttention(
#             (out_proj): NonDynamicallyQuantizableLinear(in_features=256, out_features=256, bias=True)
#           )
#           (linear1): Linear(in_features=256, out_features=128, bias=True)
#           (dropout): Dropout(p=0.1, inplace=False)
#           (linear2): Linear(in_features=128, out_features=256, bias=True)
#           (norm1): LayerNorm((256,), eps=1e-05, elementwise_affine=True)
#           (norm2): LayerNorm((256,), eps=1e-05, elementwise_affine=True)
#           (dropout1): Dropout(p=0.1, inplace=False)
#           (dropout2): Dropout(p=0.1, inplace=False)
#         )
#       )
#     )
#   )
#   (fc_out_disc): Linear(in_features=256, out_features=1, bias=True)
#   (dec_fc_in): Linear(in_features=512, out_features=256, bias=True)
#   (dec_transformer): TransformerEncoder(
#     (layers): ModuleList(
#       (0-3): 4 x TransformerEncoderLayer(
#         (self_attn): MultiheadAttention(
#           (out_proj): NonDynamicallyQuantizableLinear(in_features=256, out_features=256, bias=True)
#         )
#         (linear1): Linear(in_features=256, out_features=128, bias=True)
#         (dropout): Dropout(p=0.1, inplace=False)
#         (linear2): Linear(in_features=128, out_features=256, bias=True)
#         (norm1): LayerNorm((256,), eps=1e-05, elementwise_affine=True)
#         (norm2): LayerNorm((256,), eps=1e-05, elementwise_affine=True)
#         (dropout1): Dropout(p=0.1, inplace=False)
#         (dropout2): Dropout(p=0.1, inplace=False)
#       )
#     )
#   )
#   (fc_out_cls): Linear(in_features=256, out_features=5, bias=True)
#   (fc_out_bbox): Linear(in_features=256, out_features=4, bias=True)
# )
```