0b4ac4b760ca1edce1dae8b1f481a46f9a38126d,ludwig/data/dataset_synthesizer.py,,generate_image,#Any#,249
Before Change
sys.exit(-1)
// Read num_channels, width, height
num_channels = feature["preprocessing"]["num_channels"]
width = feature["preprocessing"]["width"]
height = feature["preprocessing"]["height"]
image_dest_folder = feature["destination_folder"]
After Change
// Read num_channels, width, height
destination_folder = feature.get("destination_folder", "image_files")
if PREPROCESSING in feature:
height = feature[PREPROCESSING].get("height", 28)
width = feature[PREPROCESSING].get("width", 28)
num_channels = feature[PREPROCESSING].get("num_channels", 1)
else:
height = feature.get("height", 28)
width = feature.get("width", 28)
num_channels = feature.get("num_channels", 1)
if width <= 0 or height <= 0 or num_channels < 1:
raise ValueError("Invalid arguments for generating images")
// Create a Random Image
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: uber/ludwig
Commit Name: 0b4ac4b760ca1edce1dae8b1f481a46f9a38126d
Time: 2020-10-04
Author: piero@uber.com
File Name: ludwig/data/dataset_synthesizer.py
Class Name:
Method Name: generate_image
Project Name: uber/ludwig
Commit Name: 0b4ac4b760ca1edce1dae8b1f481a46f9a38126d
Time: 2020-10-04
Author: piero@uber.com
File Name: ludwig/data/dataset_synthesizer.py
Class Name:
Method Name: generate_audio
Project Name: deepmipt/DeepPavlov
Commit Name: f528c38e26d59b231dd94b87d6603ca243fee766
Time: 2018-02-28
Author: yoptar@gmail.com
File Name: deeppavlov/core/commands/infer.py
Class Name:
Method Name: build_model_from_config