Skip to content

Instantly share code, notes, and snippets.

View Erlemar's full-sized avatar

Andrey Erlemar

View GitHub Profile
@dayyass
dayyass / pytorch_onnx_global_pooling.py
Created November 25, 2020 16:49
ONNX doesn't support PyTorch Adaptive Pooling (and Global Pooling as a special case with output_size=1). There is an implementation of Global Pooling compatible with ONNX.
import numpy as np
import torch
import torch.nn as nn
import onnx
import onnxruntime
##### INIT 1d, 2d, 3d GLOBAL POOLING MODULES #####
@jfpuget
jfpuget / Julia_Python_perf.ipynb
Last active April 15, 2022 11:55
An exercise in Python optimization: make Python benchmarks as fast, if not faster, than Julia.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.