MCPcopy Create free account
hub / github.com/ml-explore/mlx-data / image_random_crop_if

Method image_random_crop_if

mlx/data/Dataset.cpp:157–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155
156template <class T, class B>
157T Dataset<T, B>::image_random_crop_if(
158 bool cond,
159 const std::string& ikey,
160 int64_t w,
161 int64_t h,
162 const std::string& okey) const {
163 if (cond) {
164 return transform_(std::make_shared<op::ImageRandomCrop>(ikey, w, h, okey));
165 } else {
166 return T(self_);
167 }
168}
169
170template <class T, class B>
171T Dataset<T, B>::image_random_h_flip(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected