Skip to content

Instantly share code, notes, and snippets.

@sguada
sguada / double_interleave.py
Created November 2, 2020 10:56
Double interleave
def make_reverb_dataset_double_interleave(
trainer: str,
num_parallel_calls: int = 8,
prefetch: int = 0,
batch_size: int = 2048,
max_in_flight_samples_per_worker = 512,
obs_dim: int = 32,
action_dim: int = 2) -> tf.data.Dataset:
all_shapes = (
@sguada
sguada / blocking_queue.hpp
Created December 24, 2014 23:26
BlockingQueue with maximum capacity blocks on Push (if full) and on Pop (if empty)
#ifndef CAFFE_UTIL_BLOCKING_QUEUE_H_
#define CAFFE_UTIL_BLOCKING_QUEUE_H_
#include <queue>
#include "boost/thread.hpp"
namespace caffe {
template<typename T>
class BlockingQueue {