File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ void LSTM::DebugWeights() {
206
206
// Writes to the given file. Returns false in case of error.
207
207
bool LSTM::Serialize (TFile* fp) const {
208
208
if (!Network::Serialize (fp)) return false ;
209
- if (fp->FWrite (&na_, sizeof (na_), 1 ) != 1 ) return false ;
209
+ if (! fp->Serialize (&na_) ) return false ;
210
210
for (int w = 0 ; w < WT_COUNT; ++w) {
211
211
if (w == GFS && !Is2D ()) continue ;
212
212
if (!gate_weights_[w].Serialize (IsTraining (), fp)) return false ;
@@ -218,7 +218,7 @@ bool LSTM::Serialize(TFile* fp) const {
218
218
// Reads from the given file. Returns false in case of error.
219
219
220
220
bool LSTM::DeSerialize (TFile* fp) {
221
- if (fp->FReadEndian (&na_, sizeof (na_), 1 ) != 1 ) return false ;
221
+ if (! fp->DeSerialize (&na_) ) return false ;
222
222
if (type_ == NT_LSTM_SOFTMAX) {
223
223
nf_ = no_;
224
224
} else if (type_ == NT_LSTM_SOFTMAX_ENCODED) {
You can’t perform that action at this time.
0 commit comments