From 6238fcc1685f97fa764e59442255a8b808549d8b Mon Sep 17 00:00:00 2001 From: Tiago Freitas Pereira <tiagofrepereira@gmail.com> Date: Wed, 21 Nov 2018 15:53:44 +0100 Subject: [PATCH] Update shuffling with python 3. It was bugged --- bob/db/cuhk_cufsf/utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bob/db/cuhk_cufsf/utils.py b/bob/db/cuhk_cufsf/utils.py index fc6f520..bcc214e 100644 --- a/bob/db/cuhk_cufsf/utils.py +++ b/bob/db/cuhk_cufsf/utils.py @@ -10,6 +10,7 @@ This file has some utilities to deal with the files provided by the database import os import numpy +numpy.random.seed(0) import pkg_resources @@ -88,7 +89,8 @@ class FERETWrapper(): clients = range(1,1195) world = 700 dev = 494 - numpy.random.shuffle(list(clients)) + clients = list(clients) + numpy.random.shuffle(clients) return clients[0:world], clients[world:world+dev] @@ -109,7 +111,8 @@ class FERETWrapper(): world = 350 dev = 350 test = 494 - numpy.random.shuffle(list(clients)) + clients = list(clients) + numpy.random.shuffle(clients) return clients[0:world], clients[world:world+dev], clients[world+dev:world+dev+test] -- GitLab