Can I use the neural network trained by matlab to export and save python files like *. py for other programs?
古いコメントを表示
Can I use the neural network trained by matlab to export and save python files like *. py for other programs?
6 件のコメント
Walter Roberson
2022 年 11 月 6 日
If i understand correctly, you have several python source code files, .py files, and you have examples of the same source code translated into other languages, and you wish to create a neural network that can accept python source code .py files and translate them to other languages automatically ???
slevin Lee
2022 年 11 月 7 日
Walter Roberson
2022 年 11 月 7 日
".py" is the file extension used for python source code. I would think it likely that those are UTF-8 encoded text files. It is for code, not for data storage.
Python can be used to read -v5 and -v5.3 and -v7 .mat files using
import scipy.io
mat = scipy.io.loadmat('file.mat')
This cannot handle -v7.3 files, but those are HDF5 files internally so Python HDF5 interfaces can be used.
Now, it is possible that the python code you wish to use expects the files to be in a particular format. If so we would need to know which format was expected.
For example MATLAB has exportONNXNetwork as one of the external file formats that are supported for export.
slevin Lee
2022 年 11 月 7 日
Walter Roberson
2022 年 11 月 7 日
You can call python functions inside MATLAB, and you can call MATLAB functions inside python.
slevin Lee
2022 年 11 月 16 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Call Python from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!