Fix tensorflow usage
When running the algorithm as GRPC service for AI4EU, tensorflow complains about the session during the eval call.
And once the suggested fix is applied it will complain about the tensor graph being different from the session graph.
Therefore use a context manager to ensure the graph used is the correct one.