|  | Réponses  346 | PAGE  ... 12   13   14   15   16   17   18 ... |  |   | FORUM   BAR LIVE   Qui pense que c'est une bonne chose que le live soit férmé ?   | beatboxeur COMPTE SUPPRIMÉ Mardi 17 Mars 2009 à 11:25  |  
  |   | Mickyzzz (___) (EN LIGNE) Mardi 17 Mars 2009 à 11:22    Beat, répéter 50 fois par jour "Bon on va au live ou quoi" sur les sujets du barlive, y'a plus d'humour là, ça devient lourd.     __________    Sur le sujet, "c koi ce son", personne a dit ça et pourtant t'as dit qu'on etait lourds, enfin bref osef      |   |  
  | Mickyzzz COMPTE SUPPRIMÉ Mardi 17 Mars 2009 à 11:25  |  
  |   | beatboxeur  (Beat) (EN LIGNE)	Mardi 17 Mars 2009 à 11:22    Amély qu'est-ce que tu penses de ça, c'est marrant ?      _____________    Tout ce que j'écris n'est pas sensé être fait pour faire rire. Mais ça il faut pouvoir le comprendre      |   |  
  | beatboxeur COMPTE SUPPRIMÉ Mardi 17 Mars 2009 à 11:26  |  
  |   | Alors c'était quoi le but ?      |   |  
  | TAMPAX.HYGIENIK COMPTE SUPPRIMÉ Mardi 17 Mars 2009 à 11:26  |  
  |   | Me parle de Flamby hybride , j'en ai foutu partout sur mon lit taleur  :\'(     Moi perso je me porte bien ca va  |   |  
  | Bride COMPTE SUPPRIMÉ Mardi 17 Mars 2009 à 11:26  |  
  |   | Bon apparement vous etes mal baisés !!!    Ne bouger paaas !! HYBRIDE soccupe de vous            |   |  
  | TAMPAX.HYGIENIK COMPTE SUPPRIMÉ Mardi 17 Mars 2009 à 11:27  |  
  |   | * bouge plus * |   |  
  | BlUwWz COMPTE SUPPRIMÉ Mardi 17 Mars 2009 à 11:27  |  
  |   | #include <cmath>  #include <ctime>  #include <cassert>  #include <fstream>  #include <iostream>  #include <algorithm>     #include <boost/array.hpp>  #include <boost/random.hpp>  #include <boost/cstdlib.hpp>  #include <boost/tuple/tuple.hpp>  #include <boost/numeric/ublas/io.hpp>  #include <boost/numeric/ublas/vector.hpp>  #include <boost/numeric/ublas/matrix.hpp>  using namespace std;  using namespace boost;  using namespace boost::numeric;        const double       learning_rate = 0.1;  // define learning rate  const double       lambda        = 0.0;  // define lambda for weight decay  const unsigned int mnbatch_sz    = 1250; // define size of batch  const unsigned int epoc          = -1;   // define number of epoch  const unsigned int midsz         = 200;  // define number of hiden neurons        template <typename T = double>  struct sum {  	sum(const T & init = T()) : value(init) { }  	void operator()(const T & val) {  		value += val;  	}  	T value;  };     struct tanh_nl {  	template <typename T>  	T operator()(const T & vec) {  		T res(vec.size());  		for (size_t i = 0, e = vec.size(); i != e; ++i) {  			res(i) = tanh(vec(i));  		}  		return res;  	}  };     struct softmax_nl {  	template <typename T>  	T operator()(const T & vec) {  		T tmp(vec.size());  		for (size_t i = 0, e = vec.size(); i != e; ++i) {  			tmp(i) = exp(vec(i));  		}  		typename T::value_type exp_sum =  		            for_each(tmp.begin(), tmp.end(),  		                     sum<typename T::value_type>(0)).value;  		T res(vec.size());  		for (size_t i = 0, e = vec.size(); i != e; ++i) {  			res(i) = tmp(i) / exp_sum;  		}  		return res;  	}  };     template <int Dim, int NbClass>  class MLP_tanh_softmax  {  public:     	typedef ublas::vector<double>   mlp_vec;  	typedef ublas::matrix<double>   mlp_mat;  	typedef tuple<mlp_mat, mlp_mat,              // W1, W2  	              mlp_vec, mlp_vec> mlp_params;  // b1, b2  	typedef array<mlp_vec, 4>       fprop_vecs;     #define PARAMS_SIZE mlp_mat(midsz, Dim), mlp_mat(NbClass, midsz), \                      mlp_vec(midsz),      mlp_vec(NbClass)  #define INIT_MATS(x) do { \                       get<0>((x)) = ublas::zero_matrix<double>(midsz, Dim); \                       get<1>((x)) = ublas::zero_matrix<double>(NbClass, midsz); \                       } while(false)  #define INIT_VECS(x) do { \                       get<2>((x)) = ublas::zero_vector<double>(midsz); \                       get<3>((x)) = ublas::zero_vector<double>(NbClass); \                       } while(false)  			     	MLP_tanh_softmax()  	{  		reset();  	}     	void reset()  	{  		params = mlp_params(PARAMS_SIZE);     		mt19937 rng(static_cast<boost::uint32_t>(time(0)));     		// Initialisation aléatoire des paramêtres de la couche cachée dans ]-1/Dim, 1/Dim[  		// Où Dim est la taille des vecteurs d'entrée  		double ini = 1.0 / sqrt(double(Dim));  		uniform_real<> dist1(-ini, ini);  		variate_generator<mt19937&, uniform_real<> > rand1(rng, dist1);  		for (mlp_mat::array_type::iterator  		            it  = get<0>(params).data().begin(),  		            end = get<0>(params).data().end();  		            it != end; ++it) {  			*it = rand1();  		}     		// Initialisation aléatoire des paramêtres de la couche de sortie dans ]-1/midsz, 1/midsz[  		//Où midsz est la taille de la couche cachée  		ini = 1.0 / sqrt(double(midsz));  		uniform_real<> dist2(-ini, ini);  		variate_generator<mt19937&, uniform_real<> > rand2(rng, dist2);  		for (mlp_mat::array_type::iterator  		            it  = get<1>(params).data().begin(),  		            end = get<1>(params).data().end();  		            it != end; ++it) {  			*it = rand2();  		}     		// Initialisation des biais à 0  		INIT_VECS(params);  	}     	int test(const mlp_vec & vec)  	{  		fprop_vecs tmp;  		forward_prop(vec, tmp);  		return distance(tmp[3].begin(),  		                max_element(tmp[3].begin(), tmp[3].end()));  	}     voila fin du topic       |   |  
  | Bride COMPTE SUPPRIMÉ Mardi 17 Mars 2009 à 11:27  |  
  |   |            J'arrive     |   |  
  | beatboxeur COMPTE SUPPRIMÉ Mardi 17 Mars 2009 à 11:28  |  
  |   | *parti en courant très trop vite* |   |  
  | Bride COMPTE SUPPRIMÉ Mardi 17 Mars 2009 à 11:28  |  
  |   |       jvais te rattraper sale petit deserteur !  |   |  
  |  |   |  | ◄ PRÉCÉDENT | SUIVANT ► |  
  |