This file contains 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
(gpuc) 14:34:49 vladf@---:/data/vladf$ python tf_random_speed.py | |
2017-12-23 14:35:45.782703: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Found device 0 with properties: | |
name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285 | |
pciBusID: 0000:0d:00.0 | |
totalMemory: 15.89GiB freeMemory: 14.60GiB | |
2017-12-23 14:35:45.782759: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:0d:00.0, compute capability: 6.0) | |
**************************************** | |
feed_dict (randomize jit) 17.10606360435486 sec | |
loss 4542.5 -> 4.09381 | |
**************************************** |
This file contains 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
(gpuc) 16:32:04 vladf@---:/data/vladf$ python tf_random_speed.py | |
2017-12-23 16:32:34.773396: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Found device 0 with properties: | |
name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285 | |
pciBusID: 0000:0d:00.0 | |
totalMemory: 15.89GiB freeMemory: 14.60GiB | |
2017-12-23 16:32:34.773443: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:0d:00.0, compute capability: 6.0) | |
**************************************** | |
feed_dict (randomize jit) 16.786871671676636 sec | |
loss 4542.5 -> 4.15892 | |
**************************************** |
This file contains 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
# vladimir feinberg 23 dec 2017 tf 1.4 | |
# feel free to use under Apache 2.0 License terms | |
import time | |
import numpy as np | |
import tensorflow as tf | |
# pretend we don't have X, Y available until we're about | |
# to train the network, so we have to use placeholders. This is the case | |
# in, e.g., RL. |
This file contains 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
accept-process-output(#<process ycmd-server> 0 100 t) | |
ycmd--start-server("|\257}\n\362\301\325OW\333&\370I\263\324") | |
ycmd-open() | |
ycmd--request("/event_notification" (("event_name" . "FileReadyToParse") ("file_data" ("/home/vlad/Documents/cal/courses-year1/cs294-112/cal-deeprl-hw4/controllers.py" ("contents" . "import tensorflow as tf\nimport numpy as np\nimport time\nfrom utils import get_ac_dim, get_ob_dim, build_mlp\n\n\nclass Controller:\n def __init__(self):\n pass\n\n def get_action(self, state):\n raise NotImplementedError\n\n def fit(self, data):\n pass\n\n def reset(self, nstates):\n pass\n\nclass RandomController(Controller):\n def __init__(self, env):\n super().__init__()\n self.ac_space = env.action_space\n\n def get_action(self, states):\n nstates = len(states)\n return self._sample_n(nstates)\n\n def _sample_n(self, n):\n return np.random.uniform(\n low=self.ac_space.low,\n high=self |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
URLDownload[ | |
"http://library.wolfram.com/infocenter/MathSource/6770/\ | |
MatrixManipulation.m?file_id=6180", "/tmp/MatrixManipulation.m"]; | |
Quiet@Needs["LinearAlgebra`MatrixManipulation`", | |
"/tmp/MatrixManipulation.m"]; | |
ListLinePlot[ | |
Table[LinearAlgebra`MatrixManipulation`MatrixConditionNumber[ | |
RandomReal[ | |
]*ToeplitzMatrix[Reverse@Range[n]^10]], {n, 2 ^Range[9]}], | |
PlotLabel -> "poly deg 10"] |
This file contains 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
public class Average implements Sequential<Double, Integer> { | |
private long count = 0; | |
private long sum = 0; | |
private Average() {} | |
public static class AverageFactory implements Factory<Average> { | |
public Average generate() { return new Average(); } | |
} | |
public Double apply(Integer x) { | |
sum += x; | |
count += 1; |
This file contains 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
vlad@vlad-T460:~$ python | |
Python 3.5.2 (default, Sep 10 2016, 08:21:44) | |
[GCC 5.4.0 20160609] on linux | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from scipy.fftpack import dct | |
>>> import numpy as np | |
>>> for n in range(1, 5): | |
... print(dct(np.identity(n), norm='ortho')) | |
... | |
[[ 1.]] |
This file contains 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
# Subset of the million-song dataset | |
# Is a song made before or after 2002, based on its vocal features? | |
# significantly handicapping gbm here: | |
# - no cv for stopping | |
# - forcing 0.5 threshold. | |
# The above is what spark has to do | |
library(gbm) | |
library(ROCR) |
This file contains 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
// See gbm.R for context | |
// run with options: | |
// spark-shell --driver-memory 20G --executor-memory 4G --driver-java-options="-Xss500M" -i gbt.spark | |
import org.apache.spark.sql.DataFrame | |
import sys.process._ | |
import java.io._ | |
import org.apache.spark.ml.feature.VectorAssembler | |
import org.apache.spark.ml.classification.GBTClassifier | |
import org.apache.spark.ml.evaluation._ |
NewerOlder