Real brains do not organize neurons into layers. It's a messy process where one neuron could connect directly to the input and the output, while another neuron is in a long chain, while a third neuron is connected to twenty different nodes at different depths. Who decided that artificial neural networks should be very constrained in terms of shape? Is it computational convenience, or does it actually work better?
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
from collections import defaultdict | |
def simple_cycles(G): | |
def _unblock(thisnode,blocked,B): | |
stack = set([thisnode]) | |
while stack: | |
node = stack.pop() | |
if node in blocked: | |
blocked.remove(node) | |
stack.update(B[node]) |
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
# A 'map' also known as a 'dictionary' also known as a 'hashmap': | |
# https://en.wikipedia.org/wiki/Hash_table | |
# It maps 'keys' to 'values'. Keys and values can be anything: strings, tuples, integers, floats... | |
# Here, the keys are integers and the values are lists of integers. | |
d = { | |
1: [1,2,3,4,5,6,7,8,9,0], | |
2: [2,3,5,6,8,9,0], | |
3: [3,6,9], | |
4: [4,5,6,7,8,9,0], | |
5: [5,6,8,9,0], |
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
#! /usr/bin/python | |
# -*- coding: utf8 -*- | |
""" GAN-CLS """ | |
import tensorflow as tf | |
import tensorlayer as tl | |
from tensorlayer.layers import * | |
from tensorlayer.prepro import * | |
from tensorlayer.cost import * | |
import numpy as np |
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
var lukemath = new (function() { | |
var privatePi = 3.14; | |
this.tau = 2 * privatePi; | |
var privateSquare = function(n) { | |
return n * n; | |
} | |
this.fourth = function(n) { | |
return privateSquare(privateSquare(n)); | |
} | |
})(); |
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
# You run this with `$ python mastml.py settings.conf data.csv -o results/` | |
# Second example: `$ python mastml.py input.conf compositions.csv -o Desktop/model-results/` | |
# Or you open the website, upload a csv, upload a conf file, and download the resulting zip file | |
# Sections and subsections are in CamelCase; parameters are in snake_case | |
[GeneralSetup] | |
input_features = Auto # Defaults to all but last column (specifying Auto is same as omiting this option) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# Luke Miles | |
# February 2019 | |
# Drifting arm distribution demo | |
# (Public domain dedication) | |
using PyPlot | |
const num_trials = 1000 | |
const num_pulls = 10000 | |
const ε = 0.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
A | |
B | |
C | |
D | |
Exception in thread "DefaultDispatcher-worker-1" java.lang.ArithmeticException: / by zero | |
at CoolKt$main$1$f$1$1.invokeSuspend(cool.kt:17) | |
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) | |
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:238) | |
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594) | |
at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60) |
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
{ | |
"telemetry.enableTelemetry": false, | |
"telemetry.enableCrashReporter": false, | |
"editor.minimap.enabled": false, | |
"editor.lineNumbers": "off", | |
"workbench.activityBar.visible": false, | |
"workbench.statusBar.visible": false, | |
"workbench.editor.showTabs": false, | |
"editor.glyphMargin": false, | |
"editor.folding": false, |
OlderNewer