Skip to content

transform

desperadoccy edited this page May 28, 2024 · 2 revisions

transform模块介绍

transform模块和其他模块不同,调用该模块时需要在path中具体到类的方法,如"path": "transforms.Transforms.TransformForCIFARFactory.createTransform"

现有类介绍

TransformForCIFARFactory

TransformForCIFARFactory.createTransform: 对数据进行Padding、RandomHorizontalFlip、RandomCrop、Normalize操作。

TransformForCIFARFactory.createTransformWithTensor: 先将数据转为Tensor,再进行上者操作。

ToTensorFactory

ToTensorFactory.createToTensor: 将数据转为Tensor。

Clone this wiki locally