Skip to content

Instantly share code, notes, and snippets.

View jonhare's full-sized avatar

Jonathon Hare jonhare

View GitHub Profile
@jonhare
jonhare / ModelManipulatorGUI2.java
Created May 26, 2017 16:41
ModelManipulatorGUI with a real image rather than the model
/**
* Copyright (c) 2011, The University of Southampton and the individual contributors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
@jonhare
jonhare / Intro2PyTorchTensors.ipynb
Last active February 4, 2020 21:20 — forked from kfarrahi/Intro2PyTorchTensors.ipynb
PyTorch Tensor Examples
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import torch
from torchvision import transforms
from torch.utils.data import Dataset
class MyDataset(Dataset):
def __init__(self, size=5000, dim=40, random_offset=0):
super(MyDataset, self).__init__()
self.size = size
self.dim = dim
self.random_offset = random_offset