// TODO: Caching, don't read inputs for every inference
private List<InferenceInOutSequence> getInputOutputAssets() throws IOException {
        // TODO: Caching, don't read inputs for every inference
        List<InferenceInOutSequence> inOutList =
                getInputOutputAssets(mContext, mInputOutputAssets, mInputOutputDatasets);
        Boolean lastGolden = null;
        for (InferenceInOutSequence sequence : inOutList) {
            mHasGoldenOutputs = sequence.hasGoldenOutput();
            if (lastGolden == null) {
                lastGolden = mHasGoldenOutputs;
            } else {
                if (lastGolden != mHasGoldenOutputs) {
                    throw new IllegalArgumentException(
                            "Some inputs for " + mModelName + " have outputs while some don't.");
                }
            }
        }
        return inOutList;
    }
private List<InferenceInOutSequence> getInputOutputAssets() throws IOException {
// TODO: Caching, don't read inputs for every inference
List<InferenceInOutSequence> inOutList =
getInputOutputAssets(mContext, mInputOutputAssets, mInputOutputDatasets);
private List<InferenceInOutSequence> getInputOutputAssets() throws IOException {
// TODO: Caching, don't read inputs for every inference
List<InferenceInOutSequence> inOutList =
getInputOutputAssets(mContext, mInputOutputAssets, mInputOutputDatasets);
Boolean lastGolden = null;
for (InferenceInOutSequence sequence : inOutList) {
mHasGoldenOutputs = sequence.hasGoldenOutput();
if (lastGolden == null) {
lastGolden = mHasGoldenOutputs;
} else {
if (lastGolden != mHasGoldenOutputs) {
throw new IllegalArgumentException(
private List<InferenceInOutSequence> getInputOutputAssets() throws IOException {
// TODO: Caching, don't read inputs for every inference
List<InferenceInOutSequence> inOutList =
getInputOutputAssets(mContext, mInputOutputAssets, mInputOutputDatasets);
Boolean lastGolden = null;
for (InferenceInOutSequence sequence : inOutList) {
mHasGoldenOutputs = sequence.hasGoldenOutput();
if (lastGolden == null) {
lastGolden = mHasGoldenOutputs;
} else {
if (lastGolden != mHasGoldenOutputs) {
throw new IllegalArgumentException(
"Some inputs for " + mModelName + " have outputs while some don't.");
}
}
}
return inOutList;
}