Skip to content

Commit 832461a

Browse files
committed
moved to trainfprop
1 parent 2513a7e commit 832461a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tensorgraph/sequential.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ def train_fprop(self, input_state, layers=None):
1515
if layers is None:
1616
layers = range(len(self.layers))
1717
for i in layers:
18-
layer_output = self.layers[i]._train_fprop(input_state)
18+
layer_output = self.layers[i].train_fprop(input_state)
1919
input_state = layer_output
2020
return input_state
2121

2222
def test_fprop(self, input_state, layers=None):
2323
if layers is None:
2424
layers = range(len(self.layers))
2525
for i in layers:
26-
layer_output = self.layers[i]._test_fprop(input_state)
26+
layer_output = self.layers[i].test_fprop(input_state)
2727
input_state = layer_output
2828
return input_state
2929

test/tensorgraph_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def __init__(self, h, w, c):
3131

3232
class TGModel(BaseModel):
3333

34+
@BaseModel.init_name_scope
3435
def __init__(self, h, w, c, nclass):
3536
layers = []
3637
layers.append(CBR(h,w,c))
@@ -107,7 +108,7 @@ def train(n_exp, h, w, c, nclass, batch_size=100, tgmodel=True):
107108
# tensorgraph model
108109
print('..using graph model')
109110
seq = TGModel(h, w, c, nclass)
110-
y_train_sb = seq._train_fprop(X_ph)
111+
y_train_sb = seq.train_fprop(X_ph)
111112

112113
else:
113114
# tensorflow model

0 commit comments

Comments
 (0)