75
75
Flux. train! (loss, [θ], ncycle (d, 10 ), Descent (0.1 ))
76
76
@test norm (θ .- 1 ) < 1e-10
77
77
end
78
-
79
-
80
- @testset " CMUDict" begin
81
- @test cmudict ()[" CATASTROPHE" ] == :[K,AH0,T,AE1,S,T,R,AH0,F,IY0]. args
82
-
83
- @test length (CMUDict. phones ()) == 39
84
-
85
- @test length (CMUDict. symbols ()) == 84
86
- end
87
-
88
- @testset " MNIST" begin
89
- @test MNIST. images ()[1 ] isa Matrix
90
- @test MNIST. labels () isa Vector{Int64}
91
- end
92
-
93
- @testset " FashionMNIST" begin
94
- @test FashionMNIST. images ()[1 ] isa Matrix
95
- @test FashionMNIST. labels () isa Vector{Int64}
96
- end
97
-
98
- @testset " Sentiment" begin
99
- @test Data. Sentiment. train () isa Vector{Data. Tree{Any}}
100
- end
101
-
102
- @testset " Iris" begin
103
- @test Iris. features () isa Matrix
104
- @test size (Iris. features ()) == (4 ,150 )
105
-
106
- @test Iris. labels () isa Vector{String}
107
- @test size (Iris. labels ()) == (150 ,)
108
- end
109
-
110
-
111
- @testset " Housing" begin
112
- @test Housing. features () isa Matrix # test broken due to SSL certifate expiration problem
113
- @test size (Housing. features ()) == (506 , 13 )
114
-
115
- @test Housing. targets () isa Array{Float64}
116
- @test size (Housing. targets ()) == (506 , 1 )
117
- end
118
-
119
- @testset " Tree show" begin
120
- # testcase for issue #1354
121
- # testing that methods(Base.show) does not throw. Having something more specific would be too fragile
122
- buf = IOBuffer ()
123
- Base. show (buf, filter (x-> x. module == Flux, methods (Base. show). ms))
124
- str_repr = String (take! (buf))
125
- @test ! isempty (str_repr)
126
- end
0 commit comments