File tree Expand file tree Collapse file tree 2 files changed +18
-19
lines changed Expand file tree Collapse file tree 2 files changed +18
-19
lines changed Original file line number Diff line number Diff line change 44 push :
55 branches :
66 - main
7- tags : ["*"]
7+ # tags: ["*"] #uncomment the line if you want to run the workflow only when a new tag is pushed
88 workflow_dispatch :
99
1010jobs :
Original file line number Diff line number Diff line change @@ -10,30 +10,29 @@ using Zygote: Zygote
1010 # Define parameters for the model
1111 T = Float32
1212 D = 2
13- N = 32 # Define the spatial dimension for the attention layer input
14- emb_size = 16
13+ N = 16 # Define the spatial dimension for the attention layer input
14+ emb_size = 8
1515 patch_size = 4
1616 n_heads = 2
1717 d = emb_size ÷ n_heads # Dimension per attention head
1818 rng = Xoshiro (123 )
1919
2020 # Test CNN Layer Setup
21- r =
22- [3 , 3 ], c =
23- [2 , 2 ], σ =
24- [tanh, identity], b =
25- [false , false ], CnnLayers = (
26- (
27- Lux. Conv (
28- ntuple (α -> 2 r[i] + 1 , D),
29- c[i] => c[i+ 1 ],
30- σ[i];
31- use_bias = b[i],
32- init_weight = glorot_uniform_T,
33- pad = (ntuple (α -> 2 r[i] + 1 , D) .- 1 ) .÷ 2 ,
34- ) for i in eachindex (r)
35- ). .. ,
36- )
21+ r = [3 ]
22+ c = [4 , 2 ]
23+ σ = [tanh]
24+ b = [false ]
25+ CnnLayers = (
26+ (
27+ Lux. Conv (
28+ ntuple (α -> 2 r[i] + 1 , D),
29+ c[i] => c[i+ 1 ],
30+ σ[i];
31+ use_bias = b[i],
32+ pad = (ntuple (α -> 2 r[i] + 1 , D) .- 1 ) .÷ 2 ,
33+ ) for i in eachindex (r)
34+ ). .. ,
35+ )
3736
3837 # Verify CNN layers' setup
3938 @test CnnLayers != nothing
You can’t perform that action at this time.
0 commit comments