Skip to content

Commit ea20bf0

Browse files
committed
Remove dummy code from LSTMTrainer::InitTensorFlowNetwork
Signed-off-by: Stefan Weil <[email protected]>
1 parent 12f63c6 commit ea20bf0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/training/lstmtrainer.cpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ bool LSTMTrainer::InitNetwork(const STRING& network_spec, int append_index,
170170

171171
// Initializes a trainer from a serialized TFNetworkModel proto.
172172
// Returns the global step of TensorFlow graph or 0 if failed.
173-
int LSTMTrainer::InitTensorFlowNetwork(const std::string& tf_proto) {
174173
#ifdef INCLUDE_TENSORFLOW
174+
int LSTMTrainer::InitTensorFlowNetwork(const std::string& tf_proto) {
175175
delete network_;
176176
TFNetwork* tf_net = new TFNetwork("TensorFlow");
177177
training_iteration_ = tf_net->InitFromProtoStr(tf_proto);
@@ -182,11 +182,8 @@ int LSTMTrainer::InitTensorFlowNetwork(const std::string& tf_proto) {
182182
network_ = tf_net;
183183
ASSERT_HOST(recoder_.code_range() == tf_net->num_classes());
184184
return training_iteration_;
185-
#else
186-
tprintf("TensorFlow not compiled in! -DINCLUDE_TENSORFLOW\n");
187-
return 0;
188-
#endif
189185
}
186+
#endif
190187

191188
// Resets all the iteration counters for fine tuning or traininng a head,
192189
// where we want the error reporting to reset.

0 commit comments

Comments
 (0)