@@ -17,6 +17,7 @@ static const int CHANNELS = 1;
1717static const int HEIGHT = 2 ;
1818static const int WIDTH = 3 ;
1919static const int NUM_DIMENSIONS = 4 ;
20+ static const int TARGET_OPSET = 7 ;
2021
2122HRESULT DebugShapeInferrer::InferOutputShapes (IMLOperatorShapeInferenceContext* context) noexcept
2223{
@@ -95,6 +96,12 @@ void WriteToPng(vector<uint32_t> inputDims, T* inputData, uint32_t size, hstring
9596
9697template <typename T>
9798void WriteToText (vector<uint32_t > inputDims, T* inputData, uint32_t size, hstring m_filePath, MLOperatorTensorDataType dataType) {
99+ // Get current directory
100+ wchar_t buf[MAX_PATH];
101+ _wgetcwd (buf, 256 );
102+ StorageFolder parentFolder = StorageFolder::GetFolderFromPathAsync (buf).get ();
103+ parentFolder.CreateFileAsync (m_filePath, CreationCollisionOption::ReplaceExisting).get ();
104+
98105 ofstream outputFile;
99106 outputFile.open (winrt::to_string (m_filePath));
100107 outputFile << " dimensions: " ;
@@ -270,7 +277,7 @@ void DebugOperatorFactory::RegisterDebugSchema(winrt::com_ptr<IMLOperatorRegistr
270277{
271278 MLOperatorSetId operatorSetId;
272279 operatorSetId.domain = " " ;
273- operatorSetId.version = 7 ;
280+ operatorSetId.version = TARGET_OPSET ;
274281
275282 MLOperatorSchemaDescription debugSchema;
276283 debugSchema.name = " Debug" ;
@@ -356,7 +363,7 @@ void DebugOperatorFactory::RegisterDebugSchema(winrt::com_ptr<IMLOperatorRegistr
356363 std::vector<const MLOperatorSchemaDescription*> schemas{ &debugSchema };
357364 registry->RegisterOperatorSetSchema (
358365 &operatorSetId,
359- 7 /* baseline version */ ,
366+ TARGET_OPSET /* baseline version */ ,
360367 schemas.data (),
361368 static_cast <uint32_t >(schemas.size ()),
362369 nullptr ,
0 commit comments