From 240f5e9f20032e82515fa66ce784619527d1041e Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sun, 8 Aug 2021 19:59:55 +0200 Subject: Add VQGAN and loss function --- notebooks/05c-test-model-end-to-end.ipynb | 59 +++++++++++++++++++++++++------ 1 file changed, 48 insertions(+), 11 deletions(-) (limited to 'notebooks/05c-test-model-end-to-end.ipynb') diff --git a/notebooks/05c-test-model-end-to-end.ipynb b/notebooks/05c-test-model-end-to-end.ipynb index b26a1fe..42621da 100644 --- a/notebooks/05c-test-model-end-to-end.ipynb +++ b/notebooks/05c-test-model-end-to-end.ipynb @@ -2,19 +2,10 @@ "cells": [ { "cell_type": "code", - "execution_count": 4, + "execution_count": 1, "id": "1e40a88b", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The autoreload extension is already loaded. To reload it, use:\n", - " %reload_ext autoreload\n" - ] - } - ], + "outputs": [], "source": [ "%load_ext autoreload\n", "%autoreload 2\n", @@ -32,6 +23,52 @@ " " ] }, + { + "cell_type": "code", + "execution_count": 2, + "id": "f40fc669-829c-4de8-83ed-475fc6a0b8c1", + "metadata": {}, + "outputs": [], + "source": [ + "class T:\n", + " def __init__(self):\n", + " self.network = nn.Linear(1, 1)\n", + " \n", + " def get(self):\n", + " return getattr(self, \"network\")" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "d2bedf96-5388-4c7a-a048-1b97041cbedc", + "metadata": {}, + "outputs": [], + "source": [ + "t = T()" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "a6fbe3be-2a9f-4050-a397-7ad982d6cd05", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "t.get().parameters()" + ] + }, { "cell_type": "code", "execution_count": 5, -- cgit v1.2.3-70-g09d2