Closed jbentvelsen closed 1 year ago
Instead of using absolute links, use a setup function that adds the required folders to the path.
@jbentvelsen - Thanks for this. It's my understanding that automatic set up functions are currently not MathWorks style but I think this is fine because it is run by each script and the user sees it.
I'd like to request two small changes:
tiny_ophys_inferrence.mlx
here:trained_model_file = '2019_09_11_23_32_unet_single_1024_mean_absolute_error_Ai93-0450.h5';
if ~isfile(fullfile('sample_data', trained_model_file))
dropboxFileURL = 'https://www.dropbox.com/sh/vwxf1uq2j60uj9o/AAC0sZWahCJFBRARoYsw8Nnra/2019_09_11_23_32_unet_single_1024_mean_absolute_error_Ai93-0450.h5?dl=1';
destinationFile = fullfile('sample_data',trained_model_file);
try
disp('Downloading trained model...');
websave(destinationFile, dropboxFileURL);
disp('Downloaded the trained model successfully.');
catch ex
disp('Error downloading the trained model.');
throw(ex);
end
else
disp('Found the trained model')
end
so that it uses the same technique to identify where sample_data
should be? That did not run for me unless I change to the right folder.
Thanks Joris!
Thanks for your feedback! I have just pushed two commits incorporating it.
Remove the pop-up for adding the current working directory to the path. Before that, in the live scripts the plain filenames need to be replaced by relative paths to the files.