mirror of https://github.com/alibaba/MNN.git
Compare commits
4 Commits
5c4c3963a9
...
906bfc3bd3
Author | SHA1 | Date |
---|---|---|
|
906bfc3bd3 | |
|
a342efa982 | |
|
d9cfc63302 | |
|
89d0ed6df4 |
Binary file not shown.
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
|
@ -64,7 +64,7 @@ public:
|
|||
auto converImagesToFormat = CV::RGB;
|
||||
int resizeHeight = 224;
|
||||
int resizeWidth = 224;
|
||||
std::vector<float> scales = {1/255.0, 1/255.0, 1/255.0};
|
||||
std::vector<float> scales = {1/255.0f, 1/255.0f, 1/255.0f};
|
||||
std::shared_ptr<ImageDataset::ImageConfig> config(ImageDataset::ImageConfig::create(converImagesToFormat, resizeHeight, resizeWidth, scales));
|
||||
bool readAllImagesToMemory = false;
|
||||
auto dataset = ImageDataset::create(pathToImages, pathToImageTxt, config.get(), readAllImagesToMemory);
|
||||
|
|
|
@ -84,7 +84,7 @@ void _train(std::shared_ptr<Module> origin, std::shared_ptr<Module> optmized, st
|
|||
int resizeHeight = 224;
|
||||
int resizeWidth = 224;
|
||||
std::vector<float> means = {127.5, 127.5, 127.5};
|
||||
std::vector<float> scales = {1/127.5, 1/127.5, 1/127.5};
|
||||
std::vector<float> scales = {1/127.5f, 1/127.5f, 1/127.5f};
|
||||
std::vector<float> cropFraction = {0.875, 0.875}; // center crop fraction for height and width
|
||||
bool centerOrRandomCrop = false; // true for random crop
|
||||
std::shared_ptr<ImageDataset::ImageConfig> datasetConfig(ImageDataset::ImageConfig::create(converImagesToFormat, resizeHeight, resizeWidth, scales, means, cropFraction, centerOrRandomCrop));
|
||||
|
|
Loading…
Reference in New Issue