public static List<InferenceInOutSequence> getInputOutputAssets(Context context,
            InferenceInOutSequence.FromAssets[] inputOutputAssets,
            InferenceInOutSequence.FromDataset[] inputOutputDatasets) throws IOException {
        // TODO: Caching, don't read inputs for every inference
        List<InferenceInOutSequence> inOutList = new ArrayList<>();
        if (inputOutputAssets != null) {
            for (InferenceInOutSequence.FromAssets ioAsset : inputOutputAssets) {
                inOutList.add(ioAsset.readAssets(context.getAssets()));
            }
        }
        if (inputOutputDatasets != null) {
            for (InferenceInOutSequence.FromDataset dataset : inputOutputDatasets) {
                inOutList.addAll(dataset.readDataset(context.getAssets(), context.getCacheDir()));
            }
        }
        return inOutList;
    }
public static List<InferenceInOutSequence> getInputOutputAssets(Context context,
            InferenceInOutSequence.FromAssets[] inputOutputAssets,
            InferenceInOutSequence.FromDataset[] inputOutputDatasets) throws IOException {
       
        List<InferenceInOutSequence> inOutList = new ArrayList<>();
        if (inputOutputAssets != null) {
            for (InferenceInOutSequence.FromAssets ioAsset : inputOutputAssets) {
                inOutList.add(ioAsset.readAssets(context.getAssets()));
            }
        }
        if (inputOutputDatasets != null) {
            for (InferenceInOutSequence.FromDataset dataset : inputOutputDatasets) {
                inOutList.addAll(dataset.readDataset(context.getAssets(), context.getCacheDir()));
            }
        }
        return inOutList;
    }
public static list<inferenceinoutsequence> getinputoutputassets(context context, inferenceinoutsequence.fromassets[] inputoutputassets, inferenceinoutsequence.fromdataset[] inputoutputdatasets) throws ioexception { list<inferenceinoutsequence> inoutlist = new arraylist<>(); if (inputoutputassets != null) { for (inferenceinoutsequence.fromassets ioasset : inputoutputassets) { inoutlist.add(ioasset.readassets(context.getassets())); } } if (inputoutputdatasets != null) { for (inferenceinoutsequence.fromdataset dataset : inputoutputdatasets) { inoutlist.addall(dataset.readdataset(context.getassets(), context.getcachedir())); } } return inoutlist; }