/** * This method initializes and sets current session context from * the specified {@code context settings} ({@link ContextSettings}). * After invocation of this method, all the tensors that exist in * the current thread will be invalidated. * * @return created context */ public static Context initializeNew(ContextSettings contextSettings) { Context context = new Context(contextSettings); threadLocalContainer.get().context = context; return context; }
@Override public Context createContext() { //Creating context defaults return new Context(DefaultContextSettings.create()); } }