MultiView

————————————————————————————————————————————————

前台aspx代码如下:
 

 

<% @ Page Language = " C# "  AutoEventWireup = " true "  CodeFile = " MultiViewDemo.aspx.cs "  Inherits = " MultiViewDemo "   %>

<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >

< html  xmlns ="http://www.w3.org/1999/xhtml"   >
< head  runat ="server" >
    
< title > MultiView应用实例 </ title >
    
< style  type ="text/css" >
    body
{
    font-size
:  11pt ;
    font-family
:  宋体 ;
}
.mainTitle
{
    font-size
:  12pt ;
    font-weight
:  bold ;
    font-family
:  宋体 ;
}
.commonText
{
    font-size
:  11pt ;
    font-family
:  宋体 ;
}
.littleMainTitle
{
    font-size
:  10pt ;
    font-weight
:  bold ;
    font-family
:  宋体 ;
}
.TopTitle
{
    border
:  0px ;
    font-size
:  10pt ;
    font-weight
:  bold ;
    text-decoration
:  none ;
    color
:  Black ;
    display
:  inline-block ;
    width
:  100% ;     
}
.SelectedTopTitle
{
    border
:  0px ;
    font-size
:  10pt ;
    text-decoration
:  none ;
    color
:  Black ;
    display
:  inline-block ;
    width
:  100% ;
    background-color
:  White ;
}
.ContentView
{
    border
:  0px ;
    padding
:  3px 3px 3px 3px ;
    background-color
:  White ;
    display
:  inline-block ;
    width
:  390px ;
}
.SepBorder
{
    border-top-width
:  0px ;
    border-left-width
:  0px ;
    font-size
:  1px ;
    border-bottom
:  Gray 1px solid ;
    border-right-width
:  0px ;
}
.TopBorder
{
    border-right
:  Gray 1px solid ;
    border-top
:  Gray 1px solid ;
    background
:  #DCDCDC ;
    border-left
:  Gray 1px solid ;
    color
:  black ;
    border-bottom
:  Gray 1px solid ;
}
.ContentBorder
{
    border-right
:  Gray 1px solid ;
    border-top
:  Gray 0px solid ;
    border-left
:  Gray 1px solid ;
    border-bottom
:  Gray 1px solid ;
    height
:  100% ;
    width
:  100% ;
}
.SelectedTopBorder
{
    border-right
:  Gray 1px solid ;
    border-top
:  Gray 1px solid ;
    background
:  none transparent scroll repeat 0% 0% ;
    border-left
:  Gray 1px solid ;
    color
:  black ;
    border-bottom
:  Gray 0px solid ;
}
    
</ style >
</ head >
< body >
    
< form  id ="form1"  runat ="server" >
    
< div >
        
< fieldset  style ="width:400px" >
            
< legend > MultiView应用实例 </ legend >
            
< table  cellpadding ="0"  cellspacing ="0"  width ="100%"  border ="0" >
                
< tr >
                    
< td >
                        
< table  runat ="server"  cellpadding ="0"  cellspacing ="0"  width ="100%"  border ="0" >
                            
< tr  style ="height:22px" >
                                
< td  class ="SelectedTopBorder"  id ="Cell1"  align ="center"  style ="width:80px;" >
                                    
< asp:LinkButton  ID ="lButtonCompany"  runat ="server"  OnClick ="lButtonCompany_Click" > 公司介绍 </ asp:LinkButton ></ td >
                                
< td  class ="SepBorder"  style ="width:2px; height: 22px;" ></ td >
                                
< td  class ="TopBorder"  id ="Cell2"  align ="center"  style ="width:80px;" >
                                    
< asp:LinkButton  ID ="lButtonProduct"  runat ="server"  OnClick ="lButtonProduct_Click" > 产品介绍 </ asp:LinkButton ></ td >
                                
< td  class ="SepBorder"  style ="width:2px; height: 22px;" ></ td >
                                
< td  class ="TopBorder"  id ="Cell3"  align ="center"  style ="width:80px;" >
                                    
< asp:LinkButton  ID ="lButtonContact"  runat ="server"  OnClick ="lButtonContact_Click" > 联系我们 </ asp:LinkButton ></ td >
                                
< td  class ="SepBorder"  style ="width:2px; height: 22px;" ></ td >
                            
</ tr >
                        
</ table >
                    
</ td >
                
</ tr >
                
< tr >
                    
< td >
                        
< table  class ="ContentBorder"  cellpadding ="0"  cellspacing ="0"  width ="100%" >
                              
< tr >
                                  
< td  valign ="top" >
                                      
< asp:MultiView  ID ="mvCompany"  runat ="server"  ActiveViewIndex ="0" >
                                          
< asp:View  ID ="View1"  runat ="server" >
                                                        我们公司是一个正在上升时期的公司。公司目前有中科院计算机院士3人,博士后32人,博士63人,研究生120人,本科生356人,具有非常强大研发实力。
</ asp:View >
                                          
< asp:View  ID ="View2"  runat ="server" >
                                              我们有丰富的产品线,还可以为用户单独定制。目前有吹牛软件、撒谎软件、包二奶软件等等,正在研发的软件有火星定位软件、超时空软件等等。
</ asp:View >
                                          
< asp:View  ID ="View3"  runat ="server" >
                                              我们的联系方式是119,传真是110,客服电话是120,售后电话114。
</ asp:View >
                                       
</ asp:MultiView > &nbsp;
                                  
</ td >
                              
</ tr >
                           
</ table >
                       
</ td >
                  
</ tr >
            
</ table >
        
</ fieldset >
    
    
</ div >
    
</ form >
</ body >
</ html >

后台cs代码如下:

using  System;
using  System.Data;
using  System.Configuration;
using  System.Collections;
using  System.Web;
using  System.Web.Security;
using  System.Web.UI;
using  System.Web.UI.WebControls;
using  System.Web.UI.WebControls.WebParts;
using  System.Web.UI.HtmlControls;

public   partial   class  MultiViewDemo : System.Web.UI.Page
{
    
protected   void  Page_Load( object  sender, EventArgs e)
    {

    }
    
protected   void  lButtonCompany_Click( object  sender, EventArgs e)
    {
        mvCompany.ActiveViewIndex 
=   0 ;
        Cell1.Attributes[
" class " =   " SelectedTopBorder " ;
        Cell2.Attributes[
" class " =   " TopBorder " ;
        Cell3.Attributes[
" class " =   " TopBorder " ;
    }
    
protected   void  lButtonProduct_Click( object  sender, EventArgs e)
    {
        mvCompany.ActiveViewIndex 
=   1 ;
        Cell1.Attributes[
" class " =   " TopBorder " ;
        Cell2.Attributes[
" class " =   " SelectedTopBorder " ;
        Cell3.Attributes[
" class " =   " TopBorder " ;
    }
    
protected   void  lButtonContact_Click( object  sender, EventArgs e)
    {
        mvCompany.ActiveViewIndex 
=   2 ;
        Cell1.Attributes[
" class " =   " TopBorder " ;
        Cell2.Attributes[
" class " =   " TopBorder " ;
        Cell3.Attributes[
" class " =   " SelectedTopBorder " ;
    }
}

这里你可以修改页面中的css样式代码,更改成适合自己风格的色彩和样式。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 对比多视角编码(Contrastive Multiview Coding)是一种用于自监督学习的方法,它通过对同一样本的不同视角进行编码,来学习样本的特征表示。该方法可以在无需标注数据的情况下,从大量未标注的数据中学习到有用的特征表示,从而提高模型的泛化能力和性能。 ### 回答2: 对比多视图编码(Contrastive Multiview Coding, CMC)是一种新兴的自监督学习方法,是一种利用多个视角来学习数据特征的方法。相比于从传统的数据集中学习高级特征来说,CMC的作用在于通过理解不同数据视图之间的关系来代替手工标注或人为制造标签。 CMC方法将多个视角数据(例如从不同角度或时间拍摄的图像)随机组合进行研究,以便能够更好地训练出模型。这种方法的优点在于,它能够学习具有普适性的判别性特征,同时保留训练数据的复杂性。这意味着CMC方法在不依赖于大量标签数据的情况下,仍能够有效提供有用的表示特征。 CMC从理论上只需要一个loss function来完成整个模型的训练,这一点使它成为自监督学习中的热门方法之一。 它在应用中的一个重要应用是在计算机视觉领域,如图像分类、物体检测和语义分割等方面。它已经在许多计算机视觉任务中表现优异。 总之,对比多视图编码是一种适用于多视图学习的先进方法,因为它在利用不同视图之间的相似性来训练模型时非常有效,因此被广泛应用于计算机视觉领域。 ### 回答3: 对比多视图编码(Contrastive Multiview Coding,CMC)是一种新的自监督表示学习方法。它利用多视图(多角度、多尺度、多剪裁的)数据来学习特征表达,从而生成可区分、可重用的低维嵌入。该方法通常用于解决少标注数据问题,因为不像监督学习方法,它不需要标注在先。 CMC的核心思想是,使用互相独立的视角(通常指从不同的角度、尺度、或者剪裁方式上观察同一物体)来捕捉不同的特征信息,并学习如何将这些视角下的不同的低维特征嵌入到同一空间中。通过学习如何将这些特征的嵌入对样本之间的差异进行建模,在同一视角之外的样本之间也能够建立起有意义的对比关系。 具体的训练过程中,CMC通过分别对每个视角进行编码操作,为每个视角得到一个低维的特征表示,然后以最大化互相对比度的方式优化这些特征表达,让同一样本在不同视角下产生的嵌入向量更加接近,不同样本之间的嵌入向量相对较远,以此达到更好的分类效果。 总体而言,CMC具有可拓展性、半监督、不受领域限制等多样的特点,可以为许多计算机视觉任务提供有用的特征表示。此外,由于CMC利用无监督的自我学习机制,因此可以在无监督的情况下使用大规模数据,可以应用于数据集较少的任务中。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值