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 torch | |
from pytorch_lightning.metrics import Metric | |
from pytorch_lightning.utilities.distributed import gather_all_tensors | |
from pytorch_lightning.metrics import Accuracy | |
class MaxMetric(Metric): | |
""" | |
Pytorch-Lightning Metric that tracks the maximum value of a scalar/tensor across an experiment | |
""" |
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
// Script that tracks Purchase events at Shopify checkout to forward in GTM | |
// From GTM it can be sent to Google Ads, where Google Ads will process currency conversion | |
// However, ~20% of events will be blocked by ad-blockers, if you want to capture all events you will need a tool like Converge | |
// Contact me at jan [at] runconverge [dot] com to learn more. | |
<script> | |
window.dataLayer = window.dataLayer || []; | |
dataLayer.push({ ecommerce: null }); | |
dataLayer.push({ | |
event: "purchase", |