We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 09c87f7 commit dd03b30Copy full SHA for dd03b30
src/batchview.jl
@@ -112,9 +112,19 @@ _batchviewelemtype(data, ::Val{true}) =
112
Core.Compiler.return_type(batch, Tuple{_batchviewelemtype(data, Val(false))})
113
114
"""
115
- batchsize(data) -> Int
+ batchsize(data::BatchView) -> Int
116
117
Return the fixed size of each batch in `data`.
118
+
119
+# Examples
120
121
+```julia
122
+using MLUtils
123
+X, Y = MLUtils.load_iris()
124
125
+A = BatchView(X, batchsize=30)
126
+@assert batchsize(A) == 30
127
+```
128
129
batchsize(A::BatchView) = A.batchsize
130
0 commit comments