Skip to content

Commit c5d766b

Browse files
committed
Fix test
1 parent 703902c commit c5d766b

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

.github/workflows/Test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
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

1010
jobs:

test/test-model.jl

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff 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-> 2r[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-> 2r[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-> 2r[i] + 1, D),
29+
c[i] => c[i+1],
30+
σ[i];
31+
use_bias = b[i],
32+
pad = (ntuple-> 2r[i] + 1, D) .- 1) 2,
33+
) for i in eachindex(r)
34+
)...,
35+
)
3736

3837
# Verify CNN layers' setup
3938
@test CnnLayers != nothing

0 commit comments

Comments
 (0)