Skip to content

Instantly share code, notes, and snippets.

View attashe's full-sized avatar

Attashe attashe

  • Kingston, CA
View GitHub Profile
@attashe
attashe / NLL_OHEM.py
Created October 29, 2020 18:32 — forked from erogol/NLL_OHEM.py
Online hard example mining PyTorch
import torch as th
class NLL_OHEM(th.nn.NLLLoss):
""" Online hard example mining.
Needs input from nn.LogSotmax() """
def __init__(self, ratio):
super(NLL_OHEM, self).__init__(None, True)
self.ratio = ratio
import json
import time
from flask import Flask, render_template
from flask_socketio import SocketIO, send, emit
from server import State, Player
import numpy as np
app = Flask(__name__, static_folder='./static')
app.config['SECRET_KEY'] = 'secret!'
socketio = SocketIO(app, cors_allowed_origins='*')
'''
https://arxiv.org/abs/2312.00858
1. put this file in ComfyUI/custom_nodes
2. load node from <loaders>
start_step, end_step: apply this method when the timestep is between start_step and end_step
cache_interval: interval of caching (1 means no caching)
cache_depth: depth of caching
'''
@attashe
attashe / cgp.md
Created December 22, 2024 09:06 — forked from notnotrobby/cgp.md
List of free resources to study computer graphics programming.