code: public static MultiLayerNetwork restoreMultiLayerNetwork(@NonNull InputStream is, boolean loadUpdater)
              throws IOException {
          checkInputStream(is);
  
          File tmpFile = null;
          try{
              tmpFile = tempFileFromStream(is);
              return restoreMultiLayerNetwork(tmpFile, loadUpdater);
          } finally {
              if(tmpFile != null){
                  tmpFile.delete();
              }
          }
      }
docs: Load a MultiLayerNetwork from InputStream from an input stream<br>
  Note: the input stream is read fully and closed by this method. Consequently, the input stream cannot be re-used.
  
  @param is the inputstream to load from
  @return the loaded multi layer network
  @throws IOException
  @see #restoreMultiLayerNetworkAndNormalizer(InputStream, boolean)