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
import CanvasHs | |
import CanvasHs.Data | |
main = installEventHandler handl 1 | |
-- we gebruiken een simpele Int als store (maar het zou ook een record oid kunnen zijn) | |
handl :: Int -> Event -> (Int, Shape) | |
handl st StartEvent = (st, Container 900 600 [(Event defaults{eventId="123",mouseDrag=True} (Rect (34, 34) 34 200)) |
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
javascript:function creator(e,t,n)%7Bvar r%3Ddocument.createElement(n)%3Br.cellspacing%3D"3"%3Bvar i%3Ddocument.createTextNode(t)%3Br.appendChild(i)%3Be.appendChild(r)%7Dfunction displayData(e)%7Bvar t%3Ddocument.createElement("table")%3Bvar n%3Ddocument.createElement("thead")%3Bt.appendChild(n)%3Bvar r%3Ddocument.createElement("tr")%3Bcreator(r,"Name","th")%3Bcreator(r,"Type","th")%3Bcreator(r,"Score","th")%3Bn.appendChild(r)%3Bvar s%3Ddocument.createElement("tbody")%3Bt.appendChild(s)%3Bfor(i%3D0%3Bi<e.length%3Bi%2B%2B)%7Bvar o%3De%5Bi%5D.type%3Bvar r%3Ddocument.createElement("tr")%3Bcreator(r,e%5Bi%5D%5B"text"%5D,"td")%3Bcreator(r,Object.keys(e%5Bi%5D%5B"grammar_costs"%5D)%5B0%5D.slice(0,-1).substring(1),"td")%3Bcreator(r,e%5Bi%5D%5B"grammar_costs"%5D%5BObject.keys(e%5Bi%5D%5B"grammar_costs"%5D)%5B0%5D%5D,"td")%3Bs.appendChild(r)%7Ddocument.body.innerHTML%3D""%3Bdocument.body.appendChild(t)%7Did%3DrequireDynamic("CurrentUserInitialData")%5B"USER_ID"%5D%7C%7CrequireDynamic("CurrentUserInitialData")%5B"ACCOU |
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
package org.deeplearning4j.examples.regression | |
import org.canova.api.records.reader.RecordReader | |
import org.canova.api.records.reader.impl.CSVRecordReader | |
import org.canova.api.split.FileSplit | |
import org.deeplearning4j.datasets.canova.RecordReaderDataSetIterator | |
import org.deeplearning4j.datasets.iterator.DataSetIterator | |
import org.deeplearning4j.nn.api.OptimizationAlgorithm | |
import org.deeplearning4j.nn.conf.{ MultiLayerConfiguration, NeuralNetConfiguration } | |
import org.deeplearning4j.nn.conf.Updater |
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
package Test; | |
import static io.grpc.stub.ClientCalls.asyncUnaryCall; | |
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; | |
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; | |
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; | |
import static io.grpc.stub.ClientCalls.blockingUnaryCall; | |
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; | |
import static io.grpc.stub.ClientCalls.futureUnaryCall; | |
import static io.grpc.MethodDescriptor.generateFullMethodName; |
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
local rnntest = {} | |
local precision = 1e-5 | |
local mytester | |
local benchmark = false | |
local makeOldRecurrent_isdone = false | |
function rnntest.encoderdecoder() | |
torch.manualSeed(123) |
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
--[[ | |
Example of "coupled" separate encoder and decoder networks using cudnn, e.g. for sequence-to-sequence networks. | |
]]-- | |
require 'rnn' | |
require 'cunn' | |
require 'cudnn' |
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
------------------------------------------------------------------------ | |
--[[ SequencerCriterion ]]-- | |
-- Applies a criterion to each of the inputs and targets in the | |
-- corresponding input and target Tables. | |
-- Useful for nn.Repeater and nn.Sequencer. | |
-- WARNING : assumes that the decorated criterion is stateless, i.e. | |
-- the backward doesn't need to be preceded by a commensurate forward. | |
------------------------------------------------------------------------ | |
local SequencerCriterion, parent = torch.class('nn.SequencerCriterion', 'nn.Criterion') |
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
Copyright (c) 2016, Joost van Doorn | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
1. Redistributions of source caode must retain the above copyright notice, this | |
list of conditions and the following disclaimer. | |
2. Redistributions in binary form must reproduce the above copyright notice, | |
this list of conditions and the following disclaimer in the documentation |
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
0.023262095961369 | |
0.043782837063209 | |
0.092482087101952 | |
0.18747380309514 | |
0.36381674030978 | |
0.70580721911491 | |
1.1544929836985 | |
1.7231447811158 | |
2.396492313429 | |
2.9533659130322 |
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
-- Simple Sentence Similarity Example with Siamese Encoder | |
-- Author: Joost van Doorn (joostvandoorn.com) | |
require 'nn' | |
require 'rnn' | |
require 'io' | |
local pl = require 'pl' | |
local dl = require 'dataload' | |
-- Options | |
local opt = {} |
OlderNewer