diff --git a/.gitignore b/.gitignore index 70111ee..fc36b08 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ .DS_Store tools *_old + +.fake +Copilot/ diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..fdce722 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,14 @@ +{ + "python.languageServer": "Pylance", + "python.analysis.typeCheckingMode": "basic", + "typescript.tsserver.maxTsServerMemory": 3072, + "typescript.tsserver.watchOptions": { + "watchFile": "dynamicPriorityPolling" + }, + "javascript.suggest.includeAutomaticOptionalChainCompletions": false, + "debug.saveBeforeStart": "none", + "vscode-as-git-mergetool.settingsAssistantOnStartup": false, + "c3.welcome.showFeatureHighlight": false, + "git-blame.gitWebUrl": "", + "workbench.view.alwaysShowHeaderActions": true +} \ No newline at end of file diff --git a/p1ch2/2_pre_trained_networks.ipynb b/p1ch2/2_pre_trained_networks.ipynb index 50ca0c8..70bef5f 100644 --- a/p1ch2/2_pre_trained_networks.ipynb +++ b/p1ch2/2_pre_trained_networks.ipynb @@ -3,7 +3,11 @@ { "cell_type": "code", "execution_count": 1, - "metadata": {}, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [], "source": [ "from torchvision import models" @@ -12,7 +16,11 @@ { "cell_type": "code", "execution_count": 2, - "metadata": {}, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [ { "data": { @@ -72,7 +80,11 @@ { "cell_type": "code", "execution_count": 3, - "metadata": {}, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [], "source": [ "alexnet = models.AlexNet()" @@ -81,7 +93,11 @@ { "cell_type": "code", "execution_count": 4, - "metadata": {}, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [], "source": [ "resnet = models.resnet101(pretrained=True)" @@ -90,7 +106,11 @@ { "cell_type": "code", "execution_count": 5, - "metadata": {}, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [ { "data": { @@ -438,7 +458,11 @@ { "cell_type": "code", "execution_count": 6, - "metadata": {}, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [], "source": [ "from torchvision import transforms\n", @@ -455,7 +479,11 @@ { "cell_type": "code", "execution_count": 7, - "metadata": {}, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [], "source": [ "from PIL import Image\n", @@ -465,7 +493,11 @@ { "cell_type": "code", "execution_count": 8, - "metadata": {}, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [ { "data": { @@ -486,7 +518,11 @@ { "cell_type": "code", "execution_count": 9, - "metadata": {}, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [], "source": [ "img_t = preprocess(img)" @@ -495,7 +531,11 @@ { "cell_type": "code", "execution_count": 10, - "metadata": {}, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [], "source": [ "import torch\n", @@ -505,7 +545,11 @@ { "cell_type": "code", "execution_count": 11, - "metadata": {}, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [ { "data": { @@ -853,7 +897,11 @@ { "cell_type": "code", "execution_count": 12, - "metadata": {}, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [ { "data": { @@ -1074,7 +1122,11 @@ { "cell_type": "code", "execution_count": 13, - "metadata": {}, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [], "source": [ "with open('../data/p1ch2/imagenet_classes.txt') as f:\n", @@ -1084,7 +1136,11 @@ { "cell_type": "code", "execution_count": 14, - "metadata": {}, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [], "source": [ "_, index = torch.max(out, 1)" @@ -1093,7 +1149,11 @@ { "cell_type": "code", "execution_count": 15, - "metadata": {}, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [ { "data": { @@ -1114,7 +1174,11 @@ { "cell_type": "code", "execution_count": 16, - "metadata": {}, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [ { "data": { @@ -1139,7 +1203,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "pycharm": { + "name": "#%%\n" + } + }, "outputs": [], "source": [] } @@ -1165,4 +1233,4 @@ }, "nbformat": 4, "nbformat_minor": 2 -} +} \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 0e24fbf..b2cd5cf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,9 +4,9 @@ # # And then the virtual environment can be created by running: # -# python3 -m venv .venv -# .venv/bin/pip install --upgrade pip -# .venv/bin/pip install -r requirements.txt +python3 -m venv .venv +.venv/bin/pip install --upgrade pip +.venv/bin/pip install -r requirements.txt # # Then use .venv/bin/python to run the various training scripts.