{ "cells": [ { "cell_type": "code", "execution_count": null, "id": "38674fe9", "metadata": {}, "outputs": [], "source": [ "import Theano\n", "from Theano import tensor\n", "a = tensor.dscalar()\n", "b = tensor.dscalar()\n", "c = a + b \n", "f = theano.function([a,b], c)\n", "d = tensor.matrix()\n", "e = f(4.5, 5.5)\n", "print(e)\n", "theno.printing.pydotprint(f, outfile = \"scalar_addition.png\", var_with_name_simple = True)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.10.10" } }, "nbformat": 4, "nbformat_minor": 5 }