MacroTools provides a library of tools for working with Julia code and expressions.

Overview

MacroTools.jl

Build Status

MacroTools provides a library of tools for working with Julia code and expressions. This includes a powerful template-matching system and code-walking tools that let you do deep transformations of code in a few lines. See the docs for more info.

Suggestions, issues and pull requsts are welcome.

Installation

]add MacroTools
Comments
  • Fixes 165, Fixes 177.

    Fixes 165, Fixes 177.

    A partial rewrite of splitarg and combinearg to fix https://github.com/FluxML/MacroTools.jl/issues/165 and https://github.com/FluxML/MacroTools.jl/issues/177.

    The big change here is that arg_type can be nothing if no type is declared for an argument. I know that this is a change to the interface, but I also see no other way to fix the problem. While we are changing the interface, we may want to consider handling literal nothing as an argument default through the base Some and something interface. (discussed in https://github.com/FluxML/MacroTools.jl/issues/35).

    opened by willow-ahrens 23
  • Option to deterministically generate unique ids instead of randomized animal names

    Option to deterministically generate unique ids instead of randomized animal names

    There are a couple of problems with the current animal name scheme used in alias_gensyms:

    1. There are only about 220 animal names in animals.txt. If you have more than 220 gensyms the following line in the current alias_gensyms function is going to error out:

    [email protected]!(syms, x, pop!(left))

    (left is a copy of the animals symbol list)

    1. Currently, the animal names list is randomized when the package is initialized. While working on ONNX.jl we were finding that given the same inputs we would get different code generated due to this randomization. This makes it very difficult for us to debug as we made changes to ONNX.jl and wanted to compare code generated from a prior version on the same inputs.

    This patch generates a simple unique id in the form of "sym_id_$counter" where the counter value is incremented on each gensym encountered.

    I would have preferred replacing all of the "#" characters in the gensym with blanks, however that did not work for me even though I tried the same scheme in the REPL on a gensym string and it did work (see the comment I added in alias_gensyms - maybe someone could get that working?)

    opened by philtomson 13
  • Support function return types in longdef/shortdef

    Support function return types in longdef/shortdef

    I also have a function that uses MacroTools to parse any function definition and return (name, arg, kwargs, body, return_type). Would that be accepted?

    opened by cstjean 13
  • more faithfully reconstruct original function in combinedef

    more faithfully reconstruct original function in combinedef

    Previously combinedef would put an ::Any return type annotation on any function it reconstructed that didn't have one originally, and also wrap the function body in one extra begin block. These both seem completely superfluous except amazingly when combined they trigger the bug I reported here: https://github.com/JuliaLang/julia/issues/29326.

    This PR gets rid of those things and more faithfully reconstructs the original function.

    I also switched to returning the expression via @q which would allow whatever macro is calling combinedef to insert the desired line numbers in there.

    opened by marius311 9
  • move shuffling of animals to be done on demand instead of during initialization

    move shuffling of animals to be done on demand instead of during initialization

    This package is heavily used throughout the ecosystem so optimizing its load time is quite important. The compilation time of the shuffle! call in the __init__ function adds quite a bit of overhead, so I moved this to be done the first time the variable is actually used instead.

    Without this PR:

    julia> @time using MacroTools
      0.067275 seconds (142.56 k allocations: 9.640 MiB, 61.33% compilation time)
    

    With this PR:

    julia> @time using MacroTools
      0.024947 seconds (28.79 k allocations: 3.159 MiB, 22.04% compilation time)
    

    It also removed quite a bit of "noise" when profiling other packages load time that happens to depend on this pacakge recursively.

    opened by KristofferC 8
  • code quality improvements from JET analysis

    code quality improvements from JET analysis

    I ran JET analysis on this package, and fixed some true positive errors.

    run JET on MacroTools

    julia> using JET
    julia> report_file("src/MacroTools.jl"; analyze_from_definitions = true, annotate_types = true)
    

    Before this PR

    ═════ 11 possible errors found ═════
    ┌ @ src/match/match.jl:27 Base.getproperty(Base.getproperty(MacroTools.Base, :match::Symbol)::typeof(match)(r"^@?(.*?)_+(_str)?$", MacroTools.string(s::Symbol)::String)::Union{Nothing, RegexMatch}, :captures::Symbol)
    │┌ @ Base.jl:33 Base.getfield(x::Nothing, f::Symbol)
    ││ type Nothing has no field captures
    │└──────────────
    ┌ @ src/match/types.jl:20 MacroTools.map(MacroTools.totype, ts::Vector{Symbol})
    │┌ @ abstractarray.jl:2301 Base.collect_similar(A::Vector{Symbol}, Base.Generator(f::typeof(MacroTools.totype), A::Vector{Symbol})::Base.Generator{Vector{Symbol}, typeof(MacroTools.totype)})
    ││┌ @ array.jl:620 Base._collect(cont::Vector{Symbol}, itr::Base.Generator{Vector{Symbol}, typeof(MacroTools.totype)}, Base.IteratorEltype(itr::Base.Generator{Vector{Symbol}, typeof(MacroTools.totype)})::Base.EltypeUnknown, Base.IteratorSize(itr::Base.Generator{Vector{Symbol}, typeof(MacroTools.totype)})::Base.HasShape{1})
    │││┌ @ array.jl:710 Base.collect_to_with_first!(Base._similar_for(c::Vector{Symbol}, Base.typeof(v1::Union{Expr, Symbol})::Union{Type{Expr}, Type{Symbol}}, itr::Base.Generator{Vector{Symbol}, typeof(MacroTools.totype)}, isz::Base.HasShape{1})::Union{Vector{Expr}, Vector{Symbol}}, v1::Union{Expr, Symbol}, itr::Base.Generator{Vector{Symbol}, typeof(MacroTools.totype)}, st::Int64)
    ││││┌ @ array.jl:715 Base.setindex!(dest::Vector{Symbol}, v1::Expr, i1::Int64)
    │││││┌ @ array.jl:853 Base.convert(_::Type{Symbol}, x::Expr)
    ││││││ no matching method found for call signature: Base.convert(_::Type{Symbol}, x::Expr)
    │││││└────────────────
    ││││┌ @ array.jl:715 Base.setindex!(dest::Vector{Expr}, v1::Symbol, i1::Int64)
    │││││┌ @ array.jl:853 Base.convert(_::Type{Expr}, x::Symbol)
    ││││││ no matching method found for call signature: Base.convert(_::Type{Expr}, x::Symbol)
    │││││└────────────────
    ┌ @ src/utils.jl:21 Base.collect(Base.Generator(#11::MacroTools.var"#11#12", MacroTools.map(MacroTools.esc, xs::Tuple)::Any)::Base.Generator{_A, MacroTools.var"#11#12"} where _A)
    │┌ @ array.jl:697 Base.collect_to_with_first!(Base._array_for(Base.typeof(v1::Expr)::Type{Expr}, Base.getproperty(itr::Base.Generator{_A, MacroTools.var"#11#12"} where _A, :iter::Symbol)::Any, isz::Any)::Any, v1::Expr, itr::Base.Generator{_A, MacroTools.var"#11#12"} where _A, st::Any)
    ││┌ @ array.jl:721 Base.grow_to!(dest::Any, itr::Base.Generator{_A, MacroTools.var"#11#12"} where _A, st::Any)
    │││┌ @ dict.jl:153 Base.indexed_iterate(Core.getfield(Base.indexed_iterate(y::Tuple{Expr, Any}, 1)::Tuple{Expr, Int64}, 1)::Expr, 1)
    ││││┌ @ tuple.jl:89 Base.iterate(I::Expr)
    │││││ no matching method found for call signature: Base.iterate(I::Expr)
    ││││└───────────────
    ┌ @ src/utils.jl:423 MacroTools.rebuilddef(MacroTools.striplines(dict::Dict)::Dict)
    │ variable MacroTools.rebuilddef is not defined: MacroTools.rebuilddef(MacroTools.striplines(dict::Dict)::Dict)
    └────────────────────
    ┌ @ src/utils.jl:455 Core.tuple(splitvar::MacroTools.var"#splitvar#35"(arg::Any)::Union{Nothing, Tuple{Any, Any}}, Core.tuple(is_splat::Bool, default::Any)::Tuple{Bool, Any}...)
    │ no matching method found for call signature: Core.tuple(splitvar::MacroTools.var"#splitvar#35"(arg::Any)::Union{Nothing, Tuple{Any, Any}}, Core.tuple(is_splat::Bool, default::Any)::Tuple{Bool, Any}...)
    └────────────────────
    ┌ @ src/utils.jl:457 Core.tuple(splitvar::MacroTools.var"#splitvar#35"(arg_expr2::Any)::Union{Nothing, Tuple{Any, Any}}, Core.tuple(is_splat::Bool, MacroTools.nothing)::Tuple{Bool, Nothing}...)
    │ no matching method found for call signature: Core.tuple(splitvar::MacroTools.var"#splitvar#35"(arg_expr2::Any)::Union{Nothing, Tuple{Any, Any}}, Core.tuple(is_splat::Bool, MacroTools.nothing)::Tuple{Bool, Nothing}...)
    └────────────────────
    ┌ @ src/structdef.jl:13 MacroTools.parse_error(ex::Any)
    │ variable MacroTools.parse_error is not defined: MacroTools.parse_error(ex::Any)
    └───────────────────────
    ┌ @ src/structdef.jl:21 MacroTools.parse_error(ex::Any)
    │ variable MacroTools.parse_error is not defined: MacroTools.parse_error(ex::Any)
    └───────────────────────
    ┌ @ src/structdef.jl:29 MacroTools.parse_error(ex::Any)
    │ variable MacroTools.parse_error is not defined: MacroTools.parse_error(ex::Any)
    └───────────────────────
    ┌ @ src/examples/destruct.jl:24 MacroTools.error("Can't destructure fields with default values")
    │┌ @ error.jl:33 error(::String)
    ││ may throw: Base.throw($(Expr(:invoke, MethodInstance for ErrorException(::String), :(Base.ErrorException), Core.Argument(2)))::ErrorException)
    │└───────────────
    

    After this PR: only the false positives ramain (Julia's inference or JET itself should be improved)

    ═════ 4 possible errors found ═════
    ┌ @ src/match/types.jl:20 MacroTools.map(MacroTools.totype, ts::Vector{Symbol})
    │┌ @ abstractarray.jl:2301 Base.collect_similar(A::Vector{Symbol}, Base.Generator(f::typeof(MacroTools.totype), A::Vector{Symbol})::Base.Generator{Vector{Symbol}, typeof(MacroTools.totype)})
    ││┌ @ array.jl:620 Base._collect(cont::Vector{Symbol}, itr::Base.Generator{Vector{Symbol}, typeof(MacroTools.totype)}, Base.IteratorEltype(itr::Base.Generator{Vector{Symbol}, typeof(MacroTools.totype)})::Base.EltypeUnknown, Base.IteratorSize(itr::Base.Generator{Vector{Symbol}, typeof(MacroTools.totype)})::Base.HasShape{1})
    │││┌ @ array.jl:710 Base.collect_to_with_first!(Base._similar_for(c::Vector{Symbol}, Base.typeof(v1::Union{Expr, Symbol})::Union{Type{Expr}, Type{Symbol}}, itr::Base.Generator{Vector{Symbol}, typeof(MacroTools.totype)}, isz::Base.HasShape{1})::Union{Vector{Expr}, Vector{Symbol}}, v1::Union{Expr, Symbol}, itr::Base.Generator{Vector{Symbol}, typeof(MacroTools.totype)}, st::Int64)
    ││││┌ @ array.jl:715 Base.setindex!(dest::Vector{Symbol}, v1::Expr, i1::Int64)
    │││││┌ @ array.jl:853 Base.convert(_::Type{Symbol}, x::Expr)
    ││││││ no matching method found for call signature: Base.convert(_::Type{Symbol}, x::Expr)
    │││││└────────────────
    ││││┌ @ array.jl:715 Base.setindex!(dest::Vector{Expr}, v1::Symbol, i1::Int64)
    │││││┌ @ array.jl:853 Base.convert(_::Type{Expr}, x::Symbol)
    ││││││ no matching method found for call signature: Base.convert(_::Type{Expr}, x::Symbol)
    │││││└────────────────
    ┌ @ src/utils.jl:21 Base.collect(Base.Generator(#11::MacroTools.var"#11#12", MacroTools.map(MacroTools.esc, xs::Tuple)::Any)::Base.Generator{_A, MacroTools.var"#11#12"} where _A)
    │┌ @ array.jl:697 Base.collect_to_with_first!(Base._array_for(Base.typeof(v1::Expr)::Type{Expr}, Base.getproperty(itr::Base.Generator{_A, MacroTools.var"#11#12"} where _A, :iter::Symbol)::Any, isz::Any)::Any, v1::Expr, itr::Base.Generator{_A, MacroTools.var"#11#12"} where _A, st::Any)
    ││┌ @ array.jl:721 Base.grow_to!(dest::Any, itr::Base.Generator{_A, MacroTools.var"#11#12"} where _A, st::Any)
    │││┌ @ dict.jl:153 Base.indexed_iterate(Core.getfield(Base.indexed_iterate(y::Tuple{Expr, Any}, 1)::Tuple{Expr, Int64}, 1)::Expr, 1)
    ││││┌ @ tuple.jl:89 Base.iterate(I::Expr)
    │││││ no matching method found for call signature: Base.iterate(I::Expr)
    ││││└───────────────
    ┌ @ src/examples/destruct.jl:24 MacroTools.error("Can't destructure fields with default values")
    │┌ @ error.jl:33 error(::String)
    ││ may throw: Base.throw($(Expr(:invoke, MethodInstance for ErrorException(::String), :(Base.ErrorException), Core.Argument(2)))::ErrorException)
    │└───────────────
    
    opened by aviatesk 8
  • improve code quality and type instabilities

    improve code quality and type instabilities

    I used JET and fixed some actual errors and type instabilities. (this PR is the final output of my demo at our workshop)

    /cc @pfitzseb Could you review this PR, please ? :)

    opened by aviatesk 7
  • splitarg incompatible with kwargs on 1.7

    splitarg incompatible with kwargs on 1.7

    Therefore, it is no longer safe to do funcdef[:kwargs] = map(arg->combinearg(splitarg(arg)...), funcdef[:kwargs], since this would transform a definition like f(;kwargs...) to f(;kwargs::Any...) which is no longer allowed in Julia 1.7. I don't know why that's no longer allowed, but from the REPL:

    ERROR: syntax: "x::Any" is not a valid function argument name around REPL[3]:1
    Stacktrace:
     [1] top-level scope
       @ REPL[3]:1
    
    opened by willow-ahrens 6
  • make

    make "slurp" pattern configurable

    This PR setups IGNORED_SLURP_PATTERNS::Set{Symbol}, which allows users to configure patterns that should not be recognized as "slurp"s.

    The motivation here is that there can be double-scores in variable names and so we sometimes may want them not to be recognized as "slurp" pattern.

    For example, let's consider when we want to specify a pattern that only matches __init__() expression:

    julia> @capture(:(__init__()), __init__()), @capture(:(foo()), __init__()) # you may want the latter case not to match
    (true, true)
    

    With this PR, we can configure IGNORED_SLURP_PATTERNS and achieve what we want:

    julia> push!(MacroTools.IGNORED_SLURP_PATTERNS, :__init__); # configure `IGNORED_SLURP_PATTERNS`
    
    julia> @capture(:(__init__()), __init__()), @capture(:(foo()), __init__()) # now `__init__` isn't recognized as slurp pattern
    (true, false)
    

    IGNORED_SLURP_PATTERNS is initialized as an empty set, and thus this change doesn't break any existing behavior by default.

    opened by aviatesk 6
  • don't use exceptions to implement `ismatch` and `trymatch`

    don't use exceptions to implement `ismatch` and `trymatch`

    This is causing https://github.com/JuliaLang/julia/issues/28221. At least for APIs that return a result instead of exposing MatchError, the package should use return values instead of exceptions.

    opened by JeffBezanson 5
  • bizzare match failure for macros in type assertions

    bizzare match failure for macros in type assertions

    MacroTools can't match macros when they appear in the type assertions in function calls. This seems like a crazy issue, but a key macro in my package depended on this functionality and now something has changed with the latest julia build and things fail. Any ideas as to why this match failure would happen?

                   _
       _       _ _(_)_     |  A fresh approach to technical computing
      (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
       _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
      | | | | | | |/ _` |  |
      | | |_| | | | (_| |  |  Version 0.7.0-DEV.5246 (2018-05-29 13:27 UTC)
     _/ |\__'_|_|_|\__'_|  |  Commit 082be9a (8 days old master)
    |__/                   |  x86_64-apple-darwin17.5.0
    
    (v0.7) pkg> up MacroTools
      Updating registry at `~/.julia/registries/Uncurated`
      Updating git-repo `https://github.com/JuliaRegistries/Uncurated.git`
     Resolving package versions...
      Updating `~/.julia/environments/v0.7/Project.toml`
     [no changes]
      Updating `~/.julia/environments/v0.7/Manifest.toml`
     [no changes]
    
    julia> using MacroTools
    
    julia> x = :(foo(x::@bar(qux))).args[2].args[2]
    :(#= REPL[3]:1 =# @bar qux)
    
    julia> :(@bar(qux))
    :(#= REPL[4]:1 =# @bar qux)
    
    julia> x.head
    :macrocall
    
    julia> :(@bar(qux)).head
    :macrocall
    
    julia> x.args
    3-element Array{Any,1}:
     Symbol("@bar")
     :(#= REPL[3]:1 =#)
     :qux
    
    julia> :(@bar(qux)).args
    3-element Array{Any,1}:
     Symbol("@bar")
     :(#= REPL[8]:1 =#)
     :qux
    
    julia> @capture(x, @bar(qux))
    false
    
    julia> @capture(:(@bar(qux)), @bar(qux))
    true
    

    EDIT: It appears that this has something to do with line number nodes getting passed as arguments to macros. I rolled a custom solution for myself, but I'll dig into this sometime when I have more time. I don't think this has anything to do with the type assertions at all now.

    opened by willow-ahrens 5
  • Splitdef errors on anonymous function with a single varargs argument

    Splitdef errors on anonymous function with a single varargs argument

    splitdef fails with an assertion on an anonymous function with a single varargs argument:

    julia> splitdef(Meta.parse(" (args...) -> 0 "))
    ERROR: ArgumentError: Not a function definition: :(args...->begin
              #= none:1 =#
              0
          end)
    Stacktrace:
     [1] splitdef(fdef::Expr)
       @ MacroTools ~/.julia/packages/MacroTools/PP9IQ/src/utils.jl:317
    

    Either adding another argument or using the long form of the definition is fine:

    julia> splitdef(Meta.parse(" (x, args...) -> 0 "))
    Dict{Symbol, Any} with 4 entries:
      :args        => Any[:x, :(args...)]
      :body        => quote…
      :kwargs      => Any[]
      :whereparams => ()
    
    julia> splitdef(Meta.parse(" function f(args...) 0 end "))
    Dict{Symbol, Any} with 5 entries:
      :name        => :f
      :args        => Any[:(args...)]
      :kwargs      => Any[]
      :body        => quote…
      :whereparams => ()
    
    opened by julbinb 1
  • @capture union problem

    @capture union problem

    Similar to what was noted in https://github.com/FluxML/MacroTools.jl/issues/40#issuecomment-357466077,

    julia> @capture :(myvariable = 2) (lhs_Symbol = rhs_)
    true
    
    julia> @capture :(myvariable = 2) (lhs_Symbol = rhs_) | someotherpat
    false
    
    julia> @capture :(myvariable = 2) (lhs_ = rhs_) | someotherpat
    true
    

    The second match should be true as well.

    opened by cstjean 0
  • add dict interface splitargdef and combineargdef

    add dict interface splitargdef and combineargdef

    This PR adds new methods splitargdef and combineargdef (in addition to existing splitarg and combinearg) that use dictionaries as an interface. The dict interface more completely expresses corner cases, as described in https://github.com/FluxML/MacroTools.jl/pull/178. In particular, it provides robust solutions for literal nothing argument defaults and avoids typeasserts when no type is given for an argument.

    opened by willow-ahrens 5
  • `isdef()` seems to return true in any case

    `isdef()` seems to return true in any case

    help?> MacroTools.isdef
      Test for function definition expressions.
    
    julia> MacroTools.isdef(:(f() = 3))
    true
    
    julia> MacroTools.isdef(:(f()))
    true
    
    julia> MacroTools.isdef(:ix)
    true
    
    
    opened by omlins 2
  • rmlines would be more useful if it worked recursively

    rmlines would be more useful if it worked recursively

    rmlines would be more useful it it worked recursively.

    rmlines(Meta.parse("""
    begin
       begin
          begin
    end
    end
    end"""))
    quote
        begin
            #= none:3 =#
            begin
                #= none:4 =#
            end
        end
    end
    

    Yes, one could use postwalk, but I don't think one should have to.

    Also, why isn't postwalk exported?

    At the very least, the documentation should manage expectations by saying that it doesn'[t work recursively and suggesting the use of postwalk.

    opened by MarkNahabedian 1
Releases(v0.5.10)
Owner
FluxML
The Elegant Machine Learning Stack
FluxML
Official Pytorch implementation of Meta Internal Learning

Official Pytorch implementation of Meta Internal Learning

10 Aug 24, 2022
Codebase for Time-series Generative Adversarial Networks (TimeGAN)

Codebase for Time-series Generative Adversarial Networks (TimeGAN)

Jinsung Yoon 532 Dec 31, 2022
Code for "My(o) Armband Leaks Passwords: An EMG and IMU Based Keylogging Side-Channel Attack" paper

Myo Keylogging This is the source code for our paper My(o) Armband Leaks Passwords: An EMG and IMU Based Keylogging Side-Channel Attack by Matthias Ga

Secure Mobile Networking Lab 7 Jan 03, 2023
Tool for installing and updating MiSTer cores and other files

MiSTer Downloader This tool installs and updates all the cores and other extra files for your MiSTer. It also updates the menu core, the MiSTer firmwa

72 Dec 24, 2022
Little Ball of Fur - A graph sampling extension library for NetworKit and NetworkX (CIKM 2020)

Little Ball of Fur is a graph sampling extension library for Python. Please look at the Documentation, relevant Paper, Promo video and External Resour

Benedek Rozemberczki 619 Dec 14, 2022
GNNAdvisor: An Efficient Runtime System for GNN Acceleration on GPUs

GNNAdvisor: An Efficient Runtime System for GNN Acceleration on GPUs [Paper, Slides, Video Talk] at USENIX OSDI'21 @inproceedings{GNNAdvisor, title=

YUKE WANG 47 Jan 03, 2023
Implementation of SwinTransformerV2 in TensorFlow.

SwinTransformerV2-TensorFlow A TensorFlow implementation of SwinTransformerV2 by Microsoft Research Asia, based on their official implementation of Sw

Phan Nguyen 2 May 30, 2022
RODD: A Self-Supervised Approach for Robust Out-of-Distribution Detection

RODD Official Implementation of 2022 CVPRW Paper RODD: A Self-Supervised Approach for Robust Out-of-Distribution Detection Introduction: Recent studie

Umar Khalid 17 Oct 11, 2022
Normalization Calibration (NorCal) for Long-Tailed Object Detection and Instance Segmentation

NorCal Normalization Calibration (NorCal) for Long-Tailed Object Detection and Instance Segmentation On Model Calibration for Long-Tailed Object Detec

Tai-Yu (Daniel) Pan 24 Dec 25, 2022
Gas detection for Raspberry Pi using ADS1x15 and MQ-2 sensors

Gas detection Gas detection for Raspberry Pi using ADS1x15 and MQ-2 sensors. Description The MQ-2 sensor can detect multiple gases (CO, H2, CH4, LPG,

Filip Š 15 Sep 30, 2022
GMFlow: Learning Optical Flow via Global Matching

GMFlow GMFlow: Learning Optical Flow via Global Matching Authors: Haofei Xu, Jing Zhang, Jianfei Cai, Hamid Rezatofighi, Dacheng Tao We streamline the

Haofei Xu 298 Jan 04, 2023
PyoMyo - Python Opensource Myo library

PyoMyo Python module for the Thalmic Labs Myo armband. Cross platform and multithreaded and works without the Myo SDK. pip install pyomyo Documentati

PerlinWarp 81 Jan 08, 2023
Frequency Spectrum Augmentation Consistency for Domain Adaptive Object Detection

Frequency Spectrum Augmentation Consistency for Domain Adaptive Object Detection Main requirements torch = 1.0 torchvision = 0.2.0 Python 3 Environm

15 Apr 04, 2022
N-Person-Check-Checker-Splitter - A calculator app use to divide checks

N-Person-Check-Checker-Splitter This is my from-scratch programmed calculator ap

2 Feb 15, 2022
Losslandscapetaxonomy - Taxonomizing local versus global structure in neural network loss landscapes

Taxonomizing local versus global structure in neural network loss landscapes Int

Yaoqing Yang 8 Dec 30, 2022
Code for paper Decoupled Dynamic Spatial-Temporal Graph Neural Network for Traffic Forecasting

Decoupled Spatial-Temporal Graph Neural Networks Code for our paper: Decoupled Dynamic Spatial-Temporal Graph Neural Network for Traffic Forecasting.

S22 43 Jan 04, 2023
Official page of Struct-MDC (RA-L'22 with IROS'22 option); Depth completion from Visual-SLAM using point & line features

Struct-MDC (click the above buttons for redirection!) Official page of "Struct-MDC: Mesh-Refined Unsupervised Depth Completion Leveraging Structural R

Urban Robotics Lab. @ KAIST 37 Dec 22, 2022
QT Py Media Knob using rotary encoder & neopixel ring

QTPy-Knob QT Py USB Media Knob using rotary encoder & neopixel ring The QTPy-Knob features: Media knob for volume up/down/mute with "qtpy-knob.py" Cir

Tod E. Kurt 56 Dec 30, 2022
Official implementation of the paper Visual Parser: Representing Part-whole Hierarchies with Transformers

Visual Parser (ViP) This is the official implementation of the paper Visual Parser: Representing Part-whole Hierarchies with Transformers. Key Feature

Shuyang Sun 117 Dec 11, 2022