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 math | |
from torch.optim.optimizer import Optimizer | |
# This version of Adam keeps an fp32 copy of the parameters and | |
# does all of the parameter updates in fp32, while still doing the | |
# forwards and backwards passes using fp16 (i.e. fp16 copies of the | |
# parameters and fp16 activations). | |
# | |
# Note that this calls .float().cuda() on the params such that it | |
# moves them to gpu 0--if you're using a different GPU or want to |
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 math | |
from torch.optim.optimizer import Optimizer | |
# This version of Adam keeps an fp32 copy of the parameters and | |
# does all of the parameter updates in fp32, while still doing the | |
# forwards and backwards passes using fp16 (i.e. fp16 copies of the | |
# parameters and fp16 activations). | |
# | |
# Note that this calls .float().cuda() on the params such that it | |
# moves them to gpu 0--if you're using a different GPU or want to |
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 numpy as np | |
import matplotlib.pyplot as plt | |
import torch | |
import torch.nn as nn | |
import torch.optim as optim | |
import torch.nn.functional as F | |
from torch.autograd import Variable | |
import torchvision | |
import torchvision.transforms as transforms | |
import numpy as np |
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 numpy as np | |
# start_point = (1,2,3) # Z, X, Y coordinate values | |
def region_grow(vol, mask, start_point, epsilon=5, HU_mid=0, HU_range=0, fill_with=1): | |
sizez = vol.shape[0] - 1 | |
sizex = vol.shape[1] - 1 | |
sizey = vol.shape[2] - 1 |
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
var fs = require('fs'); | |
//this is the path that QTNetwork classes uses for caching files for it's http client | |
//the path should be the one that has 16 folders labeled 0,1,2,3,...,F | |
exports.cachePath = '/path/to/phantomjs/cache/data/folder'; | |
//this is the extension used for files in the cache path | |
exports.cacheExtension = "d"; | |
//the resources that are to be saved |