In this article, I will share some of my experience on installing NVIDIA driver and CUDA on Linux OS. Here I mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can.
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
trainingData = <| | |
"random" -> RandomInteger[{1, 10}, Length[mnistDigits]], | |
"Input" -> | |
Map[RandomReal[{-0.05, 0.05}, {1, 28, 28}] + | |
ArrayReshape[ImageData[#], {1, 28, 28}] &, mnistDigits]|>; | |
generator = | |
NetChain[{EmbeddingLayer[8*6*6, 10], ReshapeLayer[{8, 6, 6}], | |
DeconvolutionLayer[8, 4, "Stride" -> 2], Ramp, | |
DeconvolutionLayer[1, 4, "Stride" -> 2, "PaddingSize" -> 1], | |
LogisticSigmoid}]; |
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
#!/bin/bash | |
################################################################################ | |
### OpenCV2 Installation Script ### | |
################################################################################ | |
# Source code at https://github.com/arthurbeggs/scripts # | |
################################################################################ | |
# # | |
# Feel free to copy and modify this file. Giving me credit for it is your # | |
# choice, but please keep references to other people's work, which I don't # |
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
DynamicModule[{board, winner, p, pmouse, ppossible, v, Reset}, | |
Reset[] := {winner, board} = {"", ConstantArray[0, {20, 20}]}; | |
Reset[]; Deploy@ | |
Graphics[Button[{Brown, Rectangle[{0, 0}, {20, 20}], Black, | |
Line[Join @@ | |
Table[{{{i, 0}, {i, 20}}, {{0, i}, {20, i}}}, {i, .5, 19.5}]], | |
Dynamic[pmouse = | |
Ceiling@MousePosition["Graphics", {-1, -1}] /. {0 -> 1, | |
21 -> 20}; | |
If[1 <= Min@pmouse <= Max@pmouse <= 20 && |