Skip to content

Instantly share code, notes, and snippets.

View TNick's full-sized avatar

Nicu Tofan TNick

View GitHub Profile
@TNick
TNick / report.txt
Created April 3, 2015 23:31
Example report for train_multi.py
```
------------------------------------------------------------------------------------------------------------------------------------------------
Index Date & Time Tag Finish Train Total Batchs Epchs Exampls Best result Tests in file
------------------------------------------------------------------------------------------------------------------------------------------------
0 2015 04 03 17:01:22 2015_04_03_17_01_22_157959 Big value detected
Apply node that caused the error: GpuElemwise{Sub}[(0, 0)](GpuElemwise{Add}[(0, 0)].0, GpuDimShuffle{0,x}.0)
Inputs types: [CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, col)]
Inputs shapes: [(64, 13), (64, 1)]
Inputs strides: [(13, 1), (1, 0)]
@TNick
TNick / gpu_pkl_to_cpu_pkl-traceback.txt
Created April 3, 2015 22:20
gpu_pkl_to_cpu_pkl.py
Traceback Traceback (most recent call last):
File "~/pylearn2/pylearn2/utils/serial.py", line 339, in _save
pickle.dump(obj, f)
File "~/anaconda/lib/python2.7/pickle.py", line 1370, in dump
Pickler(file, protocol).dump(obj)
File "~/anaconda/lib/python2.7/pickle.py", line 224, in dump
self.save(obj)
File "~/anaconda/lib/python2.7/pickle.py", line 331, in save
self.save_reduce(obj=obj, *rv)
File "~/anaconda/lib/python2.7/pickle.py", line 419, in save_reduce
import logging
import re
from theano.compile import Mode
import theano
import numpy as np
from pylearn2.models.dbm import flatten
from pylearn2.utils import contains_nan, contains_inf
logger = logging.getLogger(__name__)
@TNick
TNick / error listing
Last active August 29, 2015 14:18
NaN problem in PyLearn2
ERROR (pylearn2.devtools.nan_guard): NaN detected
ERROR (pylearn2.devtools.nan_guard): In an input
ERROR (pylearn2.devtools.nan_guard): Inputs:
ERROR (pylearn2.devtools.nan_guard): var
ERROR (pylearn2.devtools.nan_guard): <CudaNdarrayType(float32, vector)>
ERROR (pylearn2.devtools.nan_guard): A. <CudaNdarrayType(float32, vector)>
ERROR (pylearn2.devtools.nan_guard): val
ERROR (pylearn2.devtools.nan_guard): [<CudaNdarray object at 0x7ffbda33c9b0>]
ERROR (pylearn2.devtools.nan_guard): var
ERROR (pylearn2.devtools.nan_guard): Elemwise{Cast{int32}}.0
@TNick
TNick / trace_calls.py
Last active August 29, 2015 14:18
This module allows tracing the calls of a running module by using the `sys.settrace()` mechanism.
# -*- coding: utf-8 -*-
"""
This module allows tracing the calls of a running module by using
the `sys.settrace()` mechanism.
Usage
-----
The simplest usage is following:
# -*- coding: utf-8 -*-
"""
Example functions for live_monitoring module (+/- part of pylearn2).
The examples in this file will not work with the live_monitoring.py
in GitHub repository. Instead, they are intended to work with the version
temporary hosted at https://gist.github.com/ead6e553fc5395449d03.git
Two variants of getting the data are presented.
With request-reply variant only one instance can connect to
@TNick
TNick / live_monitoring.py
Created March 23, 2015 23:13
pylearn2/train_extensions/live_monitoring.py
"""
Training extension for allowing querying of monitoring values while an
experiment executes.
"""
__authors__ = "Dustin Webb, Adam Stone"
__copyright__ = "Copyright 2010-2012, Universite de Montreal"
__credits__ = ["Dustin Webb, Adam Stone"]
__license__ = "3-clause BSD"
__maintainer__ = "LISA Lab"
__email__ = "pylearn-dev@googlegroups"
@TNick
TNick / dynamic.c
Created March 5, 2014 10:13
A simple dynamic array in c
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int allocated_size = 10;
int used_size = 0;
char c, *input, *tmp_input;
// allocate our buffer
input = (char*)malloc(allocated_size);
if (input == NULL) {
@TNick
TNick / test_blas.c
Last active February 12, 2019 15:33
Some routines to test blas and some code arround it
/*
* Author: Nicu Tofan
* License: BSD
*
* See below for getRealTime() license.
*/
#include <cblas.h>
@TNick
TNick / TinyXML-CmakeLists.txt
Created December 14, 2013 15:08
Cmake file for TInyXML
cmake_minimum_required(VERSION 2.8)
project(tinyxml)
include_directories(
"${PROJECT_SOURCE_DIR}"
)
add_library (tinyxml
tinystr.cpp
tinyxml.cpp