-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add "Reshape Transform" #765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Once we have this transform implemented, please revert the change in #2935 |
Can we increase the priority of this? It'll be useful in Azure Attach scenarios for Model Builder and ML NET CLI. Model's exported from Azure are ONNX and expect the format to have the shape [3,224,224]. |
Just to follow up, we were able to work around it with a custom mapping. We also ended up getting a new model that didn't require it. Example Custom Mapping that reshapes from [3,224,224] to [3 * 224 * 224]. [CustomMappingFactoryAttribute(nameof(ReshapeMapping))]
public class ReshapeMapping : CustomMappingFactory<ReshapeInput, ReshapeOutput>
{
// This is the custom mapping. We now separate it into a method, so that we can use it both in training and in loading.
public static void Mapping(ReshapeInput input, ReshapeOutput output) {
output.Reshape = input.Reshape;
}
// This factory method will be called when loading the model to get the mapping operation.
public override Action<ReshapeInput, ReshapeOutput> GetMapping()
{
return Mapping;
}
}
public class ReshapeInput
{
[ColumnName("input.1")]
[VectorType(3, 224, 224)]
public VBuffer<float> Reshape;
}
public class ReshapeOutput
{
[ColumnName("input.1")]
[VectorType(3 * 224 * 224)]
public VBuffer<float> Reshape;
} |
This issue is more than 6 years old, any update? |
We need the following functionalities in order to score TensorFlow models:
2 is already implemented as an option in the PixelExtractorTransform, and 3 could also be implemented as an option in that transform, but it may be useful to have them as a separate transform, for cases where the input data doesn't necessarily come from the PixelExtractorTransform.
The text was updated successfully, but these errors were encountered: