This file contains hidden or 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.optim.lr_scheduler import CosineAnnealingLR | |
from torch.optim import SGD | |
import matplotlib.pyplot as plt | |
STEPS = 100 | |
optimizer = SGD([torch.tensor(1)], lr=1) | |
# Use a scheduler of your choice below. | |
# Great for debugging your own schedulers! |
This file contains hidden or 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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <time.h> | |
#include <sys/time.h> | |
/* | |
Build: | |
gcc -o time_perf time_perf.c |