Skip to content

Instantly share code, notes, and snippets.

import gc
import psutil
from ptflops import get_model_complexity_info
network = ForecastModel() # Replace with your actual model
# Use ptflops to get the MACs
macs, _ = get_model_complexity_info(
network,
network.input_shape,
@lopsided
lopsided / SoftDeleteableFilter.php
Created January 27, 2015 11:24
Soft deleteable filter
<?php
/**
* This is an adaptation of the same filter used in the Doctrine2 Behaviours package found here:
* https://github.com/Atlantic18/DoctrineExtensions
*
* It is a simplified filter made for use with the KnpLabs Doctrine Behaviours package found here:
* https://github.com/KnpLabs/DoctrineBehaviors
* (as this package doesn't include a filter)
*