Commit 112bd95b authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Compatibility to python 2.5

parent 5de07640
Pipeline #5739 canceled with stages
in 2 minutes and 51 seconds
......@@ -67,7 +67,7 @@ class FullyConnected(Layer):
def create_variables(self, input_layer):
self.input_layer = input_layer
if self.W is None:
input_dim = reduce(mul, self.input_layer.get_shape().as_list()[1:])
input_dim =[1:])
if self.init_value is None:
self.init_value = input_dim
from .BaseLoss import BaseLoss
from .ContrastiveLoss import ContrastiveLoss
from .TripletLoss import TripletLoss
from NegLogLoss import NegLogLoss
from .NegLogLoss import NegLogLoss
# gets sphinx autodoc done right - don't remove it
......@@ -317,14 +317,14 @@ class SequenceNetwork(six.with_metaclass(abc.ABCMeta, object)):
session = Session.instance().session
open(path+"_sequence_net.pickle", 'w').write(self.pickle_architecture)
open(path+"_sequence_net.pickle", 'wb').write(self.pickle_architecture)
return, path)
def load(self, path, clear_devices=False, session_from_scratch=False):
session = Session.instance(new=session_from_scratch).session
self.sequence_net = pickle.loads(open(path+"_sequence_net.pickle").read())
self.sequence_net = pickle.loads(open(path+"_sequence_net.pickle", 'rb').read())
if clear_devices:
saver = tf.train.import_meta_graph(path + ".meta", clear_devices=clear_devices)
......@@ -8,7 +8,7 @@ from .FaceNet import FaceNet
from .FaceNetSimple import FaceNetSimple
from .VGG16 import VGG16
from .VGG16_mod import VGG16_mod
from SimpleAudio import SimpleAudio
from .SimpleAudio import SimpleAudio
# gets sphinx autodoc done right - don't remove it
def __appropriate__(*args):
Markdown is supported
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