'datasetExists' not found (for GAN)

12 ビュー (過去 30 日間)
Salad Box
Salad Box 2023 年 3 月 24 日
コメント済み: Salad Box 2023 年 3 月 28 日
Hi,
I am a beginer in GAN and was trying this example below.
As seen below, the first part of the code is for downloading the Flower data set. In there (in the code) it has something called "datasetExists".
% Download and extract the Flower data set
url = "http://download.tensorflow.org/example_images/flower_photos.tgz";
downloadFolder = tempdir;
filename = fullfile(downloadFolder,"flower_dataset.tgz");
imageFolder = fullfile(downloadFolder,"flower_photos");
if ~datasetExists(imageFolder)
disp("Downloading Flowers data set (218 MB)...")
websave(filename,url);
untar(filename,downloadFolder)
end
But when I put these code in, I got "datasetExists" not found.
I got this in the command window.
Then I clicked the second link from the bottom, it opens up the datasetExists function. But it still doesn't help.
How to deal with this Error? I am not entirely sure. Can anyone share some opinions or advices please? Very much appreciated!!

採用された回答

Sivylla Paraskevopoulou
Sivylla Paraskevopoulou 2023 年 3 月 24 日
移動済み: Adam Danz 2023 年 3 月 24 日
Hi! How are you opening the example? If you use this command:
openExample('nnet/TrainGenerativeAdversarialNetworkGANExample')
Then you open the example in a folder that includes all supporting files. One of these supporting files is datasetExists.m. If you are just copying and pasting parts of the example into your own script or at the command line, you will not have access to the supporting files, unless you add them to your current folder or path.
  1 件のコメント
Salad Box
Salad Box 2023 年 3 月 28 日
Thank you for your reply. If I click on "try this example", I can't really see the output line by line. I was just trying to understand what each line means by looking at the outputs.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by