Commit afaf968f authored by Guillaume HEUSCH's avatar Guillaume HEUSCH
Browse files

Merge branch 'update-CI' into 'master'

updated .gitlab-ci.yml with latest one

See merge request !5
parents a99cf262 543474f0
Pipeline #26150 passed with stages
in 8 minutes and 7 seconds
......@@ -48,10 +48,18 @@ stages:
key: "linux-cache"
build_linux_27:
<<: *linux_build_job
variables:
PYTHON_VERSION: "2.7"
.build_macosx_template: &macosx_build_job
<<: *build_job
tags:
- macosx
artifacts:
expire_in: 1 week
paths:
- _ci/
- ${CONDA_ROOT}/conda-bld/osx-64/*.tar.bz2
cache:
<<: *build_caches
key: "macosx-cache"
build_linux_36:
......@@ -68,6 +76,12 @@ build_linux_36:
- ${CONDA_ROOT}/conda-bld/linux-64/*.tar.bz2
build_macosx_36:
<<: *macosx_build_job
variables:
PYTHON_VERSION: "3.6"
# Deploy targets
.deploy_template: &deploy_job
stage: deploy
......@@ -76,8 +90,8 @@ build_linux_36:
script:
- ./_ci/deploy.sh
dependencies:
- build_linux_27
- build_linux_36
- build_macosx_36
tags:
- deployer
......
......@@ -80,10 +80,13 @@ class ConditionalGAN_generator(nn.Module):
"""
generator_input = torch.cat((z, y), 1)
if isinstance(generator_input.data, torch.cuda.FloatTensor) and self.ngpu > 1:
output = nn.parallel.data_parallel(self.main, generator_input, range(self.ngpu))
else:
output = self.main(generator_input)
#if isinstance(generator_input.data, torch.cuda.FloatTensor) and self.ngpu > 1:
# output = nn.parallel.data_parallel(self.main, generator_input, range(self.ngpu))
#else:
# output = self.main(generator_input)
# let's assume that we will never face the case where more than a GPU is used ...
output = self.main(generator_input)
return output
......@@ -159,8 +162,11 @@ class ConditionalGAN_discriminator(nn.Module):
the output of the discriminator
"""
input_discriminator = torch.cat((images, y), 1)
if isinstance(input_discriminator.data, torch.cuda.FloatTensor) and self.ngpu > 1:
output = nn.parallel.data_parallel(self.main, input_discriminator, range(self.ngpu))
else:
output = self.main(input_discriminator)
#if isinstance(input_discriminator.data, torch.cuda.FloatTensor) and self.ngpu > 1:
# output = nn.parallel.data_parallel(self.main, input_discriminator, range(self.ngpu))
#else:
# output = self.main(input_discriminator)
# let's assume that we will never face the case where more than a GPU is used ...
output = self.main(input_discriminator)
return output.view(-1, 1).squeeze(1)
......@@ -74,10 +74,13 @@ class DCGAN_generator(nn.Module):
the output of the generator (i.e. an image)
"""
if isinstance(input.data, torch.cuda.FloatTensor) and self.ngpu > 1:
output = nn.parallel.data_parallel(self.main, input, range(self.ngpu))
else:
output = self.main(input)
#if isinstance(input.data, torch.cuda.FloatTensor) and self.ngpu > 1:
# output = nn.parallel.data_parallel(self.main, input, range(self.ngpu))
#else:
# output = self.main(input)
# let's assume that we will never face the case where more than a GPU is used ...
output = self.main(input)
return output
......@@ -148,9 +151,12 @@ class DCGAN_discriminator(nn.Module):
the output of the generator (i.e. an image)
"""
if isinstance(input.data, torch.cuda.FloatTensor) and self.ngpu > 1:
output = nn.parallel.data_parallel(self.main, input, range(self.ngpu))
else:
output = self.main(input)
#if isinstance(input.data, torch.cuda.FloatTensor) and self.ngpu > 1:
# output = nn.parallel.data_parallel(self.main, input, range(self.ngpu))
#else:
# output = self.main(input)
# let's assume that we will never face the case where more than a GPU is used ...
output = self.main(input)
return output.view(-1, 1).squeeze(1)
......@@ -23,9 +23,9 @@ class CasiaWebFaceDataset(Dataset):
The path to the data
transform : `torchvision.transforms`
The transform(s) to apply to the face images
data_files : list of str
data_files : list of :obj:`str`
The list of data files
id_labels : list of int
id_labels : list of :obj:`int`
The list of identities, for each data file
"""
......@@ -108,11 +108,11 @@ class CasiaDataset(Dataset):
The path to the data
transform : `torchvision.transforms`
The transform(s) to apply to the face images
data_files: list of str
data_files: list of :obj:`str`
The list of data files
id_labels : list of int
id_labels : list of :obj:`int`
The list of identities, for each data file
pose_labels : list of int
pose_labels : list of :obj:`int`
The list containing the pose labels
"""
......
......@@ -24,7 +24,7 @@ class CNNTrainer(object):
The network to train
batch_size: int
The size of your minibatch
use_gpu: boolean
use_gpu: bool
If you would like to use the gpu
verbosity_level: int
The level of verbosity output to stdout
......@@ -40,7 +40,7 @@ class CNNTrainer(object):
The network to train
batch_size: int
The size of your minibatch
use_gpu: boolean
use_gpu: bool
If you would like to use the gpu
verbosity_level: int
The level of verbosity output to stdout
......
......@@ -22,7 +22,7 @@ class ConditionalGANTrainer(object):
The generator network
discriminator : :py:class:`torch.nn.Module`
The discriminator network
image_size: list of int
image_size: list of :obj:`int`
The size of the images in this format: [channels,height, width]
batch_size: int
The size of your minibatch
......@@ -49,7 +49,7 @@ class ConditionalGANTrainer(object):
The generator network
netD : :py:class:`torch.nn.Module`
The discriminator network
image_size: list of int
image_size: list of :obj:`int`
The size of the images in this format: [channels,height, width]
batch_size: int
The size of your minibatch
......
......@@ -29,7 +29,7 @@ requirements:
- bob.core
- bob.io.base
- bob.io.image
- pytorch =0.4
- pytorch >=0.4
- torchvision >=0.2.0
run:
- python
......
......@@ -6,5 +6,5 @@ bob.extension
bob.core
bob.io.base
bob.io.image
torch == 0.4.0
torch >= 0.4.0
torchvision >= 0.2.0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment