Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 argparse | |
from pathlib import Path | |
import timm | |
import timm.data | |
import timm.loss | |
import timm.optim | |
import timm.utils | |
import torch | |
import torchmetrics |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/bin/bash | |
# ============================================================================= | |
# Install AzCopy on Linux | |
# https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10 | |
# https://github.com/Azure/azure-storage-azcopy | |
# ----------------------------------------------------------------------------- | |
# Developer.......: Andre Essing (https://www.andre-essing.de/) | |
# (https://github.com/aessing) | |
# (https://twitter.com/aessing) | |
# (https://www.linkedin.com/in/aessing/) |
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
from pathlib import Path | |
from timm.data.parsers.parser import Parser | |
class ParserImageName(Parser): | |
def __init__(self, root, class_to_idx=None): | |
super().__init__() | |
self.root = Path(root) |
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
from torch.utils.data import Dataset | |
class EfficientDetDataset(Dataset): | |
def __init__( | |
self, dataset_adaptor, transforms=get_valid_transforms() | |
): | |
self.ds = dataset_adaptor | |
self.transforms = transforms | |
def __getitem__(self, index): |
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
from pytorch_accelerated.callbacks import TrainerCallback | |
import torchmetrics | |
class RecommenderMetricsCallback(TrainerCallback): | |
def __init__(self): | |
self.metrics = torchmetrics.MetricCollection( | |
{ | |
"mse": torchmetrics.MeanSquaredError(), | |
"mae": torchmetrics.MeanAbsoluteError(), | |
} |
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 | |
from torch import nn | |
class MfDotBias(nn.Module): | |
def __init__( | |
self, n_factors, n_users, n_items, ratings_range=None, use_biases=True | |
): | |
super().__init__() | |
self.bias = use_biases |
NewerOlder