Skip to content

Instantly share code, notes, and snippets.

simeonschaub

Block or report user

Report or block simeonschaub

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View abs_to_pow.jl
using ChainRulesCore
import ChainRulesCore: wirtinger_primal, wirtinger_conjugate
using ChainRulesCore: AbstractDifferential
using FiniteDifferences
using Test
abs_to_pow(x, p) = abs(x)^p
@scalar_rule(abs_to_pow(x::Real, p),
(p == 0 ? Zero() : p * abs_to_pow(x, p-1) * sign(x), Ω * log(abs(x))))
@scalar_rule(
View toy_chainrules_cassette_ad.jl
using Cassette, Test
using Cassette: @context, enabletagging, @overdub, overdub, recurse,
hasmetadata, metadata, tag, untag
using ChainRules: frule, Zero, extern
@context DiffCtx
Cassette.metadatatype(::Type{<:DiffCtx}, ::Type{T}) where {T<:Real} = T
function D(f, x)
View designer.html
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
View designer.html
<link rel="import" href="../paper-ripple/paper-ripple.html">
<polymer-element name="name-card" attributes="first, name, color, href">
<template>
<style>
#core_card {
position: absolute;
border-top-left-radius: 2px;
border-top-right-radius: 2px;
You can’t perform that action at this time.