Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yilin-bao authored Dec 8, 2023
1 parent 340d3ca commit 4cf602e
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,71 @@ For the example `TestingCode`, we are using a code base of vit: https://github.c
['self', 'embedding_layer', 'embedding_layer.projection', 'embedding_layer.projection.0', 'embedding_layer.projection.1', 'embedding_layer.projection.2', 'embedding_layer.projection.3', 'transformer', 'transformer.layers', 'transformer.layers.0', 'transformer.layers.0.0', 'transformer.layers.0.0.norm', 'transformer.layers.0.0.fn', 'transformer.layers.0.0.fn.qkv', 'transformer.layers.0.0.fn.attn_drop', 'transformer.layers.0.0.fn.proj', 'transformer.layers.0.0.fn.proj_drop', 'transformer.layers.0.1', 'transformer.layers.0.1.norm', 'transformer.layers.0.1.fn', 'transformer.layers.0.1.fn.net', 'transformer.layers.0.1.fn.net.0', 'transformer.layers.0.1.fn.net.1', 'transformer.layers.0.1.fn.net.2', 'transformer.layers.0.1.fn.net.3', 'transformer.layers.1', 'transformer.layers.1.0', 'transformer.layers.1.0.norm', 'transformer.layers.1.0.fn', 'transformer.layers.1.0.fn.qkv', 'transformer.layers.1.0.fn.attn_drop', 'transformer.layers.1.0.fn.proj', 'transformer.layers.1.0.fn.proj_drop', 'transformer.layers.1.1', 'transformer.layers.1.1.norm', 'transformer.layers.1.1.fn', 'transformer.layers.1.1.fn.net', 'transformer.layers.1.1.fn.net.0', 'transformer.layers.1.1.fn.net.1', 'transformer.layers.1.1.fn.net.2', 'transformer.layers.1.1.fn.net.3', 'transformer.layers.2', 'transformer.layers.2.0', 'transformer.layers.2.0.norm', 'transformer.layers.2.0.fn', 'transformer.layers.2.0.fn.qkv', 'transformer.layers.2.0.fn.attn_drop', 'transformer.layers.2.0.fn.proj', 'transformer.layers.2.0.fn.proj_drop', 'transformer.layers.2.1', 'transformer.layers.2.1.norm', 'transformer.layers.2.1.fn', 'transformer.layers.2.1.fn.net', 'transformer.layers.2.1.fn.net.0', 'transformer.layers.2.1.fn.net.1', 'transformer.layers.2.1.fn.net.2', 'transformer.layers.2.1.fn.net.3', 'transformer.layers.3', 'transformer.layers.3.0', 'transformer.layers.3.0.norm', 'transformer.layers.3.0.fn', 'transformer.layers.3.0.fn.qkv', 'transformer.layers.3.0.fn.attn_drop', 'transformer.layers.3.0.fn.proj', 'transformer.layers.3.0.fn.proj_drop', 'transformer.layers.3.1', 'transformer.layers.3.1.norm', 'transformer.layers.3.1.fn', 'transformer.layers.3.1.fn.net', 'transformer.layers.3.1.fn.net.0', 'transformer.layers.3.1.fn.net.1', 'transformer.layers.3.1.fn.net.2', 'transformer.layers.3.1.fn.net.3', 'transformer.layers.4', 'transformer.layers.4.0', 'transformer.layers.4.0.norm', 'transformer.layers.4.0.fn', 'transformer.layers.4.0.fn.qkv', 'transformer.layers.4.0.fn.attn_drop', 'transformer.layers.4.0.fn.proj', 'transformer.layers.4.0.fn.proj_drop', 'transformer.layers.4.1', 'transformer.layers.4.1.norm', 'transformer.layers.4.1.fn', 'transformer.layers.4.1.fn.net', 'transformer.layers.4.1.fn.net.0', 'transformer.layers.4.1.fn.net.1', 'transformer.layers.4.1.fn.net.2', 'transformer.layers.4.1.fn.net.3', 'transformer.layers.5', 'transformer.layers.5.0', 'transformer.layers.5.0.norm', 'transformer.layers.5.0.fn', 'transformer.layers.5.0.fn.qkv', 'transformer.layers.5.0.fn.attn_drop', 'transformer.layers.5.0.fn.proj', 'transformer.layers.5.0.fn.proj_drop', 'transformer.layers.5.1', 'transformer.layers.5.1.norm', 'transformer.layers.5.1.fn', 'transformer.layers.5.1.fn.net', 'transformer.layers.5.1.fn.net.0', 'transformer.layers.5.1.fn.net.1', 'transformer.layers.5.1.fn.net.2', 'transformer.layers.5.1.fn.net.3', 'transformer.layers.6', 'transformer.layers.6.0', 'transformer.layers.6.0.norm', 'transformer.layers.6.0.fn', 'transformer.layers.6.0.fn.qkv', 'transformer.layers.6.0.fn.attn_drop', 'transformer.layers.6.0.fn.proj', 'transformer.layers.6.0.fn.proj_drop', 'transformer.layers.6.1', 'transformer.layers.6.1.norm', 'transformer.layers.6.1.fn', 'transformer.layers.6.1.fn.net', 'transformer.layers.6.1.fn.net.0', 'transformer.layers.6.1.fn.net.1', 'transformer.layers.6.1.fn.net.2', 'transformer.layers.6.1.fn.net.3', 'transformer.layers.7', 'transformer.layers.7.0', 'transformer.layers.7.0.norm', 'transformer.layers.7.0.fn', 'transformer.layers.7.0.fn.qkv', 'transformer.layers.7.0.fn.attn_drop', 'transformer.layers.7.0.fn.proj', 'transformer.layers.7.0.fn.proj_drop', 'transformer.layers.7.1', 'transformer.layers.7.1.norm', 'transformer.layers.7.1.fn', 'transformer.layers.7.1.fn.net', 'transformer.layers.7.1.fn.net.0', 'transformer.layers.7.1.fn.net.1', 'transformer.layers.7.1.fn.net.2', 'transformer.layers.7.1.fn.net.3', 'transformer.layers.8', 'transformer.layers.8.0', 'transformer.layers.8.0.norm', 'transformer.layers.8.0.fn', 'transformer.layers.8.0.fn.qkv', 'transformer.layers.8.0.fn.attn_drop', 'transformer.layers.8.0.fn.proj', 'transformer.layers.8.0.fn.proj_drop', 'transformer.layers.8.1', 'transformer.layers.8.1.norm', 'transformer.layers.8.1.fn', 'transformer.layers.8.1.fn.net', 'transformer.layers.8.1.fn.net.0', 'transformer.layers.8.1.fn.net.1', 'transformer.layers.8.1.fn.net.2', 'transformer.layers.8.1.fn.net.3', 'transformer.layers.9', 'transformer.layers.9.0', 'transformer.layers.9.0.norm', 'transformer.layers.9.0.fn', 'transformer.layers.9.0.fn.qkv', 'transformer.layers.9.0.fn.attn_drop', 'transformer.layers.9.0.fn.proj', 'transformer.layers.9.0.fn.proj_drop', 'transformer.layers.9.1', 'transformer.layers.9.1.norm', 'transformer.layers.9.1.fn', 'transformer.layers.9.1.fn.net', 'transformer.layers.9.1.fn.net.0', 'transformer.layers.9.1.fn.net.1', 'transformer.layers.9.1.fn.net.2', 'transformer.layers.9.1.fn.net.3', 'transformer.layers.10', 'transformer.layers.10.0', 'transformer.layers.10.0.norm', 'transformer.layers.10.0.fn', 'transformer.layers.10.0.fn.qkv', 'transformer.layers.10.0.fn.attn_drop', 'transformer.layers.10.0.fn.proj', 'transformer.layers.10.0.fn.proj_drop', 'transformer.layers.10.1', 'transformer.layers.10.1.norm', 'transformer.layers.10.1.fn', 'transformer.layers.10.1.fn.net', 'transformer.layers.10.1.fn.net.0', 'transformer.layers.10.1.fn.net.1', 'transformer.layers.10.1.fn.net.2', 'transformer.layers.10.1.fn.net.3', 'transformer.layers.11', 'transformer.layers.11.0', 'transformer.layers.11.0.norm', 'transformer.layers.11.0.fn', 'transformer.layers.11.0.fn.qkv', 'transformer.layers.11.0.fn.attn_drop', 'transformer.layers.11.0.fn.proj', 'transformer.layers.11.0.fn.proj_drop', 'transformer.layers.11.1', 'transformer.layers.11.1.norm', 'transformer.layers.11.1.fn', 'transformer.layers.11.1.fn.net', 'transformer.layers.11.1.fn.net.0', 'transformer.layers.11.1.fn.net.1', 'transformer.layers.11.1.fn.net.2', 'transformer.layers.11.1.fn.net.3', 'post_transformer_ln', 'cls_layer', 'cls_layer.net', 'cls_layer.net.0']
```

```
[<ast.Assign object at 0x12eca4a30>, <ast.Call object at 0x12eca5960>, <ast.Attribute object at 0x12eca6fb0>] x x = x.permute(0, 2, 1)
self.net
['x']
[<ast.Assign object at 0x12eca5240>, <ast.Call object at 0x12eca6d10>] x x = self.net(x)
[<ast.Assign object at 0x12eca6860>, <ast.Call object at 0x12eca5d80>, <ast.Attribute object at 0x12eca7f40>] x x = x.permute(0, 2, 1)
self.net
['x']
[<ast.Assign object at 0x12eca7b50>, <ast.Call object at 0x12eca6bc0>] x x = self.net(x)
self.layer_flag transformer.layers.11
[<ast.Call object at 0x12ea8ebf0>, <ast.Call object at 0x12ea8eda0>] x self.fn(self.norm(x), **kwargs)
self.layer_flag None
[<ast.For object at 0x12eca70d0>, <ast.Assign object at 0x12eca5c60>] x for attn, ff in self.layers:
x = attn(x) + x
x = ff(x) + x
[<ast.For object at 0x12eca70d0>, <ast.Assign object at 0x12eca5c60>, <ast.BinOp object at 0x12eca7be0>, <ast.Call object at 0x12eca48e0>] x for attn, ff in self.layers:
x = attn(x) + x
x = ff(x) + x
[<ast.For object at 0x12eca70d0>, <ast.Assign object at 0x12eca5c60>, <ast.BinOp object at 0x12eca7be0>] x for attn, ff in self.layers:
x = attn(x) + x
x = ff(x) + x
[<ast.For object at 0x12eca70d0>, <ast.Assign object at 0x12eca5930>] x for attn, ff in self.layers:
x = attn(x) + x
x = ff(x) + x
[<ast.For object at 0x12eca70d0>, <ast.Assign object at 0x12eca5930>, <ast.BinOp object at 0x12eca6620>, <ast.Call object at 0x12eca75b0>] x for attn, ff in self.layers:
x = attn(x) + x
x = ff(x) + x
[<ast.For object at 0x12eca70d0>, <ast.Assign object at 0x12eca5930>, <ast.BinOp object at 0x12eca6620>] x for attn, ff in self.layers:
x = attn(x) + x
x = ff(x) + x
------------------------------------------------------------
We have find a layer post_transformer_ln, which is an instance of VisionTransformer.LayerNorm
The weight tensor for this layer is torch.Size([1536])
The bias vector for this layer is torch.Size([1536])
------------------------------------------------------------
We have find a layer cls_layer, which is an instance of VisionTransformer.OutputLayer
------------------------------------------------------------
We have find a layer cls_layer.net, which is an instance of OutputLayer.Sequential
------------------------------------------------------------
We have find a layer cls_layer.net.0, which is an instance of Sequential.Linear
The weight tensor for this layer is torch.Size([1000, 1536])
The bias vector for this layer is torch.Size([1000])
self.layer_flag None
self.to_cls_token
[]
[<ast.Assign object at 0x12eca50c0>, <ast.Call object at 0x12eca5ba0>] x x = self.to_cls_token(x[:, 0])
torch.mean
['x']
[<ast.Assign object at 0x12eca4a30>, <ast.Call object at 0x12eca5780>] x x = torch.mean(x, dim=1)
[<ast.Call object at 0x12eca60b0>] x self.net(x)
self.layer_flag None
self.embedding_layer
['x']
[<ast.Assign object at 0x12eca7e80>, <ast.Call object at 0x12eca6c20>] x x = self.embedding_layer(x)
self.transformer
['x']
[<ast.Assign object at 0x12eca5a20>, <ast.Call object at 0x12eca7910>] x x = self.transformer(x)
self.post_transformer_ln
['x']
[<ast.Assign object at 0x12eca6830>, <ast.Call object at 0x12eca5390>] x x = self.post_transformer_ln(x)
self.cls_layer
['x']
[<ast.Assign object at 0x12eca79d0>, <ast.Call object at 0x12eca48b0>] x x = self.cls_layer(x)
```

## Documentation

<!-- For in-depth instructions and additional details, refer to the [official documentation](https://your-documentation-link.com). -->
Expand Down

0 comments on commit 4cf602e

Please sign in to comment.