Hi everyone,
I am trying to perform a very simple experiment, predict the input number. The concept is same as an auto-encoder. But with just one layer, which can handle the task of encoding and decoding-
Also, wanted to observe how the network learns, with different training examples.
Initially, I took 10000 training samples, of integers, in range[1, 10000]. So, example if I pass 767676 as one of the test sample it should predict the output as 767676.0
This test passed very well.
The activation function used here was 'softplus', which keeps the values in range [0, inf).
the network -
train_d = numpy.array([i for i in range(10000)], dtype=
np.int)
model = Sequential()
model.add(Dense(1, input_shape=(1, ), activation='softplus'))
model.fit([self.train_d], self.train_d, epochs=5000, batch_size=256, shuffle=True)
Now when I gave it 10000 training sample of decimal values in the range[-1, 1]. E.g. 0.3456 the expected output will be 0.3456 but rather, its giving me 0.5721.
The network -
train_d = numpy.array[round(random.uniform(-1, 1), 4) for i in range(10000)], dtype=np.float)
model = Sequential()
model.add(Dense(self.INPUT_DIM, input_shape=(self.INPUT_DIM,), activation='softsign'))
model.fit([self.train_d], self.train_d, epochs=5000, batch_size=256, shuffle=True)
Any suggestion or thoughts are appreciated.
Thank You