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
| class View(nn.Module): | |
| def __init__(self,o): | |
| super().__init__() | |
| self.o = o | |
| def forward(self,x): | |
| return x.view(-1, self.o) | |
| class allcnn_t(nn.Module): | |
| def __init__(self, c1=96, c2= 192): |
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
| #!/bin/bash | |
| # echo everything! | |
| set -x | |
| # bin | |
| sudo rm -rf /usr/local/bin/bot-* | |
| sudo rm -rf /usr/local/bin/lcm-* | |
| # libs |
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
| require 'torch' | |
| require 'nn' | |
| use_cpu = true | |
| require('fakecuda').init(use_cpu) | |
| require 'cutorch' | |
| a = torch.randn(10) | |
| a:cuda() |
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
| function get_model() | |
| local m = nn:Sequential() | |
| m:add(cudnn.SpatialConvolution(1, 32, 5, 5)) | |
| m:add(cudnn.ReLU(true)) | |
| m:add(cudnn.SpatialMaxPooling(3,3,3,3)) | |
| m:add(cudnn.SpatialConvolution(32, 64, 5, 5)) | |
| m:add(cudnn.ReLU(true)) | |
| m:add(cudnn.SpatialMaxPooling(2,2,2,2)) |
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
| function[] = RRT() | |
| clear all;clc; clf; | |
| tree = []; | |
| buildRRT(); | |
| %plot(tree.x,tree.y,'ro-'); | |
| %plot_tree(tree) | |
| function [] = plotTree(tree) | |
| for i=1:length(tree), | |
| n = tree(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
| import sys, random, math | |
| from math import sqrt,cos,sin,atan2 | |
| #constants | |
| xdim = 640 | |
| ydim = 480 | |
| winsize = [xdim, ydim] | |
| epsilon = 10.0 | |
| num_nodes = 1000 | |
| goal = (300, 400) |