code: public ComputationGraph convertDataType(@NonNull DataType dataType){
          Preconditions.checkState(dataType.isFPType(), "Invalid DataType: %s. Can only convert network to a floating point type", dataType);
          if(dataType == params().dataType()){
              return this;
          }
  
          try(MemoryWorkspace ws = Nd4j.getMemoryManager().scopeOutOfWorkspaces()) {
              INDArray newParams = params().castTo(dataType);
              String jsonConfig = getConfiguration().toJson();
              ComputationGraphConfiguration newConf = ComputationGraphConfiguration.fromJson(jsonConfig);
              newConf.setDataType(dataType);
              ComputationGraph newNet = new ComputationGraph(newConf);
              newNet.init(newParams, false);
  
              Updater u = getUpdater(false);
              if(u != null && u.getStateViewArray() != null){
                  INDArray oldUpdaterState = u.getStateViewArray();
                  newNet.getUpdater(true).getStateViewArray().assign(oldUpdaterState);
              }
              return newNet;
          }
      }
docs: Return a copy of the network with the parameters and activations set to use the specified (floating point) data type.
  If the existing datatype is the same as the requested dataype, the original network will be returned unchanged.
  Only floating point datatypes (DOUBLE, FLOAT, HALF) may be used.
  
  @param dataType Datatype to convert the network to
  @return The network, set to use the specified datatype for the parameters and activations