docs: protected synchronized List<INDArray> ffToLayerActivationsDetached(boolean train, @NonNull FwdPassType fwdPassType,
                                                            boolean storeLastForTBPTT, int layerIndex, @NonNull INDArray input,
                                                            INDArray fMask, INDArray lMask, boolean clearInputs){
          setInput(input);
          setLayerMaskArrays(fMask, lMask);
  
          //Verify that no workspace is open externally
          WorkspaceUtils.assertNoWorkspacesOpen("Expected no workspace active in ffToLayerActivationsDetached");
  
          LayerWorkspaceMgr workspaceMgr;
          WorkspaceMode wsm = (train ? layerWiseConfigurations.getTrainingWorkspaceMode() : layerWiseConfigurations.getInferenceWorkspaceMode());
          if(wsm == WorkspaceMode.NONE){
              workspaceMgr = LayerWorkspaceMgr.noWorkspaces();
          } else {
              workspaceMgr = LayerWorkspaceMgr.builder()
                      .noWorkspaceFor(ArrayType.ACTIVATIONS)
                      .with(ArrayType.INPUT, WS_LAYER_WORKING_MEM, WS_LAYER_WORKING_MEM_CONFIG)
                      .with(ArrayType.FF_WORKING_MEM, WS_LAYER_WORKING_MEM, WS_LAYER_WORKING_MEM_CONFIG)
                      .with(ArrayType.RNN_FF_LOOP_WORKING_MEM, WS_RNN_LOOP_WORKING_MEM, WS_RNN_LOOP_WORKING_MEM_CONFIG)
                      .build();
  
              if(input.isAttached()){
                  //Don't leverage out of async DataSetIterator workspaces
                  workspaceMgr.setNoLeverageOverride(input.data().getParentWorkspace().getId());
              }
  
              if(!clearInputs){
                  workspaceMgr.setScopedOutFor(ArrayType.INPUT);
              }
          }
          workspaceMgr.setHelperWorkspacePointers(helperWorkspaces);
  
          List<INDArray> out = new ArrayList<>();
          out.add(workspaceMgr.leverageTo(ArrayType.INPUT, input));    //Should  be unnecessary (and no op), if layer is implemented correctly
  
          for( int i=0; i<=layerIndex; i++ ){
              try(MemoryWorkspace wsFFWorking = workspaceMgr.notifyScopeEntered(ArrayType.FF_WORKING_MEM)){
                  if (getLayerWiseConfigurations().getInputPreProcess(i) != null) {
                      input = getLayerWiseConfigurations().getInputPreProcess(i).preProcess(input, getInputMiniBatchSize(), workspaceMgr);
                      //Validation: Exception if invalid (bad preprocessor implementation)
                      validateArrayWorkspaces(workspaceMgr, input, ArrayType.ACTIVATIONS, i, true, "Feed forward to layer (inference)");
                  }
  
                  if(fwdPassType == FwdPassType.STANDARD){
                      input = layers[i].activate(input, train, workspaceMgr);
                  } else if (fwdPassType == FwdPassType.RNN_ACTIVATE_WITH_STORED_STATE) {
                      if (layers[i] instanceof RecurrentLayer) {
                          input = ((RecurrentLayer) layers[i]).rnnActivateUsingStoredState(input, train,
                                  storeLastForTBPTT, workspaceMgr);
                      } else if(layers[i] instanceof BaseWrapperLayer && ((BaseWrapperLayer)layers[i]).getUnderlying() instanceof RecurrentLayer) {
                          RecurrentLayer rl = (RecurrentLayer) ((BaseWrapperLayer)layers[i]).getUnderlying();
                          input = rl.rnnActivateUsingStoredState(input, train,storeLastForTBPTT, workspaceMgr);
                      } else if (layers[i] instanceof MultiLayerNetwork) {
                          List<INDArray> temp = ((MultiLayerNetwork) layers[i]).rnnActivateUsingStoredState(input, train, storeLastForTBPTT);
                          input = temp.get(temp.size() - 1);
                      } else {
                          input = layers[i].activate(input, train, workspaceMgr);
                      }
                  } else {
                      throw new IllegalStateException("Forward pass type not supported for this method: " + fwdPassType);
                  }
  
                  //Validation: Exception if invalid (bad layer implementation)
                  validateArrayWorkspaces(workspaceMgr, input, ArrayType.ACTIVATIONS, i, false, "Feed forward to layer (inference)");
  
                  out.add(input);
              }
              if(clearInputs) {
                  layers[i].clear();
              }
          }
  
          return out;
      }