{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The model is saved.\n"
     ]
    }
   ],
   "source": [
    "import onnx\n",
    "import os\n",
    "\n",
    "\n",
    "# Preprocessing: load the old model\n",
    "old_model_path = os.path.join(\"resources\", \"single_relu.onnx\")\n",
    "onnx_model = onnx.load(old_model_path)\n",
    "\n",
    "# Preprocessing: get the path to the saved model\n",
    "new_model_path = os.path.join(\"resources\", \"single_relu_new.onnx\")\n",
    "\n",
    "# Save the ONNX model\n",
    "onnx.save(onnx_model, new_model_path)\n",
    "\n",
    "print(\"The model is saved.\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
