Examples of Connections


Examples of LONI.tree.workflow.Connections

   * Convert a Pipeline to a Galaxy Workflow
   */
  public Object visit(Pipeline pipeline) {
    Workflow workflow;
    ModuleGroup mgroup = pipeline.getPipelineModuleGroup();
    Connections conns = pipeline.getConnections();
    GalaxyContext context=  new GalaxyContext();
    context.getDatabase().clear();
    NODE_COUNT = 0;
   
    //convert the module group
View Full Code Here

Examples of LONI.tree.workflow.Connections

        secret, order, ConverterConfig.GALAXY_OUTPUT_DIR) );
   
    /* Record environmental variable in context for future use*/
    /*TODO: Migrate these globals to some sort of configuration file*/
   
    Connections connections = new Connections();
   
    for(Step s : workflow.getSteps()){
      Pair<GraphObject, LoniEnvironment> dat;
      dat = (Pair<GraphObject, LoniEnvironment>) stepVisitor.visit(s, context);
      connections.addConnections(dat.getElem2().getConnections());
      mgroup.getModules().addAll(dat.getElem2().getModules());
      if(dat.getElem1() != null)
        mgroup.getModules().add(dat.getElem1());
     
    }
View Full Code Here

Examples of LONI.tree.workflow.Connections

    annotationVisitor = new AnnotationConverter();
    dataFlowImplVisitor = new DataFlowImplConverter();
  }
 
  public Connections getConnections(Dataflow dflow){
    Connections conn = (Connections) dataFlowImplVisitor.visit(dflow.getDatalinks());
    return conn;
  }
View Full Code Here

Examples of LONI.tree.workflow.Connections

  public Object visit(Workflow workflow){
    Pipeline pipeline;
    String version  = workflow.getVersion();
   
    ModuleGroup moduleGroup;
    Connections connections = getConnections(workflow.getDataflow());
    moduleGroup = (ModuleGroup) visit(workflow.getDataflow());


    pipeline = new Pipeline(version, moduleGroup, connections);
    return pipeline;
View Full Code Here

Examples of LONI.tree.workflow.Connections

  /*
   * @see Taverna.Visitor.DataFlowImplVisitor#visit(Taverna.Tree.Datalinks)
   */
  public Object visit(Datalinks d){
    this.tavernaContext.setDatalinks(d);
    Connections connections = new Connections();
    Pair<String, String> sourceAndSink;
   
    if(d.getDataLinks() != null){     
      List<DataLink> datalinkList = d.getDataLinks();
      for(DataLink datalink : datalinkList){
        sourceAndSink = (Pair) visit(datalink);
        connections.addConnection(new Connection(sourceAndSink.getElem1(), sourceAndSink.getElem2()));
      }
    } else {
      Printer.log("d.getDataLinks() is null");
    }   
    return connections;
View Full Code Here

Examples of com.github.neuralnetworks.architecture.Connections

    @Override
    public void calculate(List<Connections> connections, ValuesProvider valuesProvider, Layer targetLayer) {
  if (connections.size() > 0) {
      List<Connections> notBias = new ArrayList<>();
      Connections bias = null;

      for (Connections c : connections) {
    // bias layer scenarios
    if (Util.isBias(c.getInputLayer())) {
        bias = c;
View Full Code Here

Examples of com.github.neuralnetworks.architecture.Connections

     * @param layer
     * @return whether layer is in fact bias layer
     */
    public static boolean isBias(Layer layer) {
  if (layer.getConnections().size() == 1) {
      Connections c = layer.getConnections().get(0);
      if (c.getInputLayer() == layer) {
    if (c instanceof Conv2DConnection) {
        Conv2DConnection cc = (Conv2DConnection) c;
        return cc.getInputFilters() == 1 && cc.getInputFeatureMapRows() == cc.getOutputFeatureMapRows() && cc.getInputFeatureMapColumns() == cc.getOutputFeatureMapColumns();
    } else if (c instanceof GraphConnections) {
        GraphConnections cg = (GraphConnections) c;
View Full Code Here

Examples of com.github.neuralnetworks.architecture.Connections

     * @param layer
     * @return whether layer is in fact bias layer
     */
    public static boolean isBias(Layer layer) {
  if (layer.getConnections().size() == 1) {
      Connections c = layer.getConnections().get(0);
      if (c.getInputLayer() == layer) {
    if (c instanceof Conv2DConnection) {
        Conv2DConnection cc = (Conv2DConnection) c;
        return cc.getInputFilters() == 1 && cc.getInputFeatureMapRows() == cc.getOutputFeatureMapRows() && cc.getInputFeatureMapColumns() == cc.getOutputFeatureMapColumns();
    } else if (c instanceof FullyConnected) {
        FullyConnected cg = (FullyConnected) c;
View Full Code Here

Examples of com.github.neuralnetworks.architecture.Connections

    @Override
    public void calculate(List<Connections> connections, ValuesProvider valuesProvider, Layer targetLayer) {
  if (connections.size() > 0) {
      List<Connections> notBias = new ArrayList<>();
      Connections bias = null;

      for (Connections c : connections) {
    // bias layer scenarios
    if (Util.isBias(c.getInputLayer())) {
        bias = c;
View Full Code Here

Examples of com.neuralnetwork.shared.util.Connections

    }

    @Override
    public synchronized void build() {

      Connections c = Connections.getInstance();
    Stack<IHiddenLayer> temp = new Stack<IHiddenLayer>();
    while (!layers.empty()) {
      temp.push(layers.pop());
    }
     
      for (int i = 0; i < numHidden; i++) {
        IHiddenLayer h = new HiddenLayer(layerSizes[i]);
        h.build();
        layers.push(h);
      }
     
    while (!temp.empty()) {
      layers.push(temp.pop());
    }
     
        inputLayer.build();
        Iterator<IHiddenLayer> i = layers.iterator();
        while (i.hasNext()) {
            i.next().build();
        }
        outputLayer.build();
       
        if (!layers.isEmpty()) {
          //Connect input layer to first hidden layer.
          c.create(inputLayer, layers.get(0));
         
          //Connect each hidden layer to its child hidden layer.
          if (layers.size() >= 2) {
              i = layers.iterator();
              while (i.hasNext()) {
                  IHiddenLayer layer = i.next();
                  if (i.hasNext()) {
                      c.create(layer, i.next());
                  }
              }
          }
         
          //Connect the output layer to the last hidden layer.
          c.create(outputLayer, layers.get(layers.size() - 1));
        } else {
          c.create(inputLayer, outputLayer);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.