Skip to content

Commit

Permalink
added imports.py
Browse files Browse the repository at this point in the history
  • Loading branch information
m-gopichand committed Aug 17, 2024
1 parent 7610ab8 commit 4d676b0
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 5 deletions.
14 changes: 13 additions & 1 deletion nbs/09_augment.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -4268,6 +4268,18 @@
"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.11.9"
}
},
"nbformat": 4,
Expand Down
32 changes: 28 additions & 4 deletions nbs/12_diffusion-attn-cond.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -18,7 +18,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -28,9 +28,21 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {},
"outputs": [],
"outputs": [
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'rapidai.imports'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[3], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m#| export\u001b[39;00m\n\u001b[0;32m----> 2\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mrapidai\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mimports\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;241m*\u001b[39m\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01meinops\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m rearrange\n\u001b[1;32m 5\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mfastprogress\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m progress_bar\n",
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'rapidai.imports'"
]
}
],
"source": [
"#| export\n",
"from rapidai.imports import *\n",
Expand Down Expand Up @@ -1740,6 +1752,18 @@
"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.11.9"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"0abad3eee1904c2bb8a2f963fed5fba6": {
Expand Down
27 changes: 27 additions & 0 deletions rapidai/imports.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import torch, random, datasets, math, fastcore.all as fc, numpy as np, matplotlib as mpl, matplotlib.pyplot as plt
import torchvision.transforms as T
import torchvision.transforms.functional as TF,torch.nn.functional as F

from torch.utils.data import DataLoader,default_collate
from pathlib import Path
from torch import nn,tensor
from torch.nn import init
from fastcore.foundation import L
from datasets import load_dataset
from operator import itemgetter,attrgetter
from functools import partial,wraps
from torch.optim import lr_scheduler
from torch import optim
from torchvision.io import read_image,ImageReadMode

from rapidai.datasets import *
from rapidai.conv import *
from rapidai.learner import *
from rapidai.activations import *
from rapidai.init import *
from rapidai.sgd import *
from rapidai.resnet import *
from rapidai.augment import *
from rapidai.accel import *
from rapidai.training import *

3 changes: 3 additions & 0 deletions rapidai/imports.py:Zone.Identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
ReferrerUrl=C:\Users\mgopi\Downloads\course22p2-master (1).zip

0 comments on commit 4d676b0

Please sign in to comment.