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
package main | |
import ( | |
"log" | |
) | |
func main() { | |
c := make(chan string) | |
for i := 0; i < 10; i++ { | |
go func(i int, c chan string) { |
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
using adaptive_systeme | |
data = [[1 0 0],[1 0 1], [1 1 0], [1 1 1]] | |
result_OR = [0; 1; 1; 1] | |
result_AND = [0; 0; 0; 1] | |
result_XOR = [0; 1; 1; 0] | |
p = Perzeptron(.5, .1, result_OR, 1000, lineare) | |
training(p, data) |
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 numpy as np | |
class Perzeptron: | |
def __init__(self, t, my, d, maxiter, sign): | |
self.t = t | |
self.my = my | |
self.maxiter = maxiter | |
self.sign = sign | |
self.w = np.mat([[-self.t],[1],[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
public static File getFile(String name) { | |
URL url = Thread.currentThread().getContextClassLoader().getResource(name.replace(File.separatorChar, '/')); | |
if(url != null) { | |
try { | |
return new File(url.toURI()); | |
} catch (Exception var3) { | |
throw new RuntimeException("Resource was found on classpath, but cannot be resolved to a normal file (maybe it is part of a JAR file): " + name); | |
} | |
} else { | |
File file = new File(name); |
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
public class BlasWrapper extends BaseBlasWrapper { | |
private static final Logger log = LoggerFactory.getLogger(BlasWrapper.class); | |
public final static String FORCE_NATIVE = "org.nd4j.linalg.cpu.force_native"; | |
static { | |
// System property toggle hasSetNative var | |
// if the property isn't set the warning is allways displayed. | |
String forceNative = System.getProperty(FORCE_NATIVE,"false"); | |
boolean hasSetNative = false; |
OlderNewer