This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2024 MosaicML LLM Foundry authors | |
# SPDX-License-Identifier: Apache-2.0 | |
"""MosaicML LLM Foundry package setup.""" | |
import os | |
import re | |
import setuptools | |
from setuptools import setup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import os | |
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import torchvision.models as models | |
import warnings | |
TASKONOMY_TASKS = "autoencoder class_1000 class_places curvature denoise edge2d edge3d inpainting_whole jigsaw keypoint2d keypoint3d reshade rgb2depth rgb2sfnorm rgb2mist room_layout segment25d segment2d segmentsemantic vanishing_point".split() | |
class TaskonomyEncoder(nn.Module): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import os | |
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import torchvision.models as models | |
import warnings | |
TASKONOMY_TASKS = "autoencoder class_1000 class_places curvature denoise edge2d edge3d inpainting_whole jigsaw keypoint2d keypoint3d reshade rgb2depth rgb2sfnorm rgb2mist room_layout segment25d segment2d segmentsemantic vanishing_point".split() | |
class TaskonomyEncoder(nn.Module): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import os | |
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import torchvision.models as models | |
import warnings | |
TASKONOMY_TASKS = "autoencoder class_1000 class_places curvature denoise edge2d edge3d inpainting_whole jigsaw keypoint2d keypoint3d reshade rgb2depth rgb2sfnorm rgb2mist room_layout segment25d segment2d segmentsemantic vanishing_point".split() | |
class TaskonomyEncoder(nn.Module): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import os | |
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import torchvision.models as models | |
import warnings | |
TASKONOMY_TASKS = "autoencoder class_1000 class_places curvature denoise edge2d edge3d inpainting_whole jigsaw keypoint2d keypoint3d reshade rgb2depth rgb2sfnorm rgb2mist room_layout segment25d segment2d segmentsemantic vanishing_point".split() | |
class TaskonomyEncoder(nn.Module): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch.nn as nn | |
from torch.nn import Parameter, ModuleList | |
import torch.nn.functional as F | |
import torch | |
import multiprocessing | |
import numpy as np | |
import os | |
from gym import spaces | |
from torchvision.models import resnet18 | |
from teas.models.taskonomyencoder import TaskonomyEncoder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch.nn as nn | |
from torch.nn import Parameter, ModuleList | |
import torch.nn.functional as F | |
import torch | |
import multiprocessing | |
import numpy as np | |
import os | |
from gym import spaces | |
from torchvision.models import resnet18 | |
from teas.models.taskonomyencoder import TaskonomyEncoder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
from torch import nn | |
from torch.nn import init | |
# pre-trained SRResNet model | |
model_url = 'https://s3.amazonaws.com/pytorch/demos/srresnet-e10b2039.pth' | |
# model definition | |
def _initialize_orthogonal(conv): |