-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GCI "Filter layers that are exclusive to selected frameworks" #418
Changes from 9 commits
03115b8
807afb6
1d4a783
db576e3
7e197ff
555e8f1
071aebd
4ad5a1f
3503fad
5eff333
94ffe32
e13de94
6223c70
603cef9
ec4781c
22c835d
24d347a
244980b
c61dde2
6b48678
e053568
cd40ef0
ad4dfa9
18532a0
bc81f8d
702aca3
9ba2d18
95d250c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,100 @@ | ||||||
import React from 'react'; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rename the file to |
||||||
import $ from 'jquery' | ||||||
|
||||||
class FilterBar extends React.Component { | ||||||
constructor(props) { | ||||||
super(props); | ||||||
this.changeEvent= this.changeEvent.bind(this); | ||||||
} | ||||||
|
||||||
changeEvent() { | ||||||
var KerasLayers = ["RNN_Button", "GRU_Button", "LSTM_Button", "Embed_Button", "Eltwise_Button", | ||||||
"ThresholdedReLU", "ReLU_Button", "PReLU_Button", "Softmax_Button", "BatchNorm_Button", | ||||||
"GaussianNoise_Button", "GaussianDropout_Button", "AlphaDropout_Button", "TimeDistributed_Button", | ||||||
"Bidirectional_Button", "RepeatVector_Button", "Masking_Button", "Permute_Button", "InnerProduct_Button", | ||||||
"Deconvolution_Button", "Regularization_Button", "Softsign_Button", "Upsample_Button", "Pooling_Button", | ||||||
"LocallyConnected_Button", "Crop_Button"]; | ||||||
var TensorFlowLayers = ["RNN_Button", "GRU_Button", "LSTM_Button", "Embed_Button", "Eltwise_Button", | ||||||
"ThresholdedReLU", "ReLU_Button", "PReLU_Button", "Softmax_Button", "BatchNorm_Button", "GaussianNoise_Button", | ||||||
"GaussianDropout_Button", "AlphaDropout_Button", "TimeDistributed_Button", "Bidirectional_Button", | ||||||
"RepeatVector_Button", "Masking_Button", "Permute_Button", "InnerProduct_Button", "Deconvolution_Button", | ||||||
"Regularization_Button", "Softsign_Button", "Upsample_Button", "Pooling_Button", "LocallyConnected_Button", | ||||||
"SoftmaxWithLoss_Button", "SigmoidCrossEntropyLoss_Button", "Crop_Button", "DepthwiseConv_Button"]; | ||||||
var CaffeLayers = ["ImageData_Button", "HDF5Data_Button", "HDF5Output_Button", "Input_Button", "WindowData_Button", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a newline above this |
||||||
"MemoryData_Button", "DummyData_Button", "Convolution_Button", "Pooling_Button", "SPP_Button", "Deconvolution_Button", | ||||||
"Recurrent_Button", "RNN_Button", "LSTM_Button", "LRN_Button", "MVN_Button", "BatchNorm_Button", | ||||||
"InnerProduct_Button", "Dropout_Button", "Embed_Button", "ReLU_Button", "PReLU_Button", "ELU_Button", | ||||||
"Sigmoid_Button", "TanH_Button", "AbsVal_Button", "Power_Button", "Exp_Button", "Log_Button", "BNLL_Button", | ||||||
"Threshold_Button", "Bias_Button", "Scale_Button", "Softplus_Button", "HardSigmoid_Button", "Flatten_Button", | ||||||
"Reshape_Button", "BatchReindex_Button", "Split_Button", "Concat_Button", "Eltwise_Button", "Filter_Button", | ||||||
"Reduction_Button", "Silence_Button", "ArgMax_Button", "Softmax_Button", "MultinomialLogisticLoss_Button", | ||||||
"InfogainLoss_Button", "SoftmaxWithLoss_Button", "EuclideanLoss_Button", "HingeLoss_Button", | ||||||
"SigmoidCrossEntropyLoss_Button", "Accuracy_Button", "ContrastiveLoss_Button", "Data_Button", "Crop_Button"]; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You forgot Threshold Relu, Slice, Python layers. Apart from these, I didn't find any layers that were missed. |
||||||
var CheckBoxA = document.getElementById("CheckBoxA"); | ||||||
var CheckBoxB = document.getElementById("CheckBoxB"); | ||||||
var CheckBoxC = document.getElementById("CheckBoxC"); | ||||||
var visible = []; | ||||||
if(CheckBoxA.checked == false & CheckBoxB.checked == false & CheckBoxC.checked == false){ | ||||||
for (let elem of $('.drowpdown-button')) { | ||||||
elem.classList.remove("hide"); | ||||||
} | ||||||
} | ||||||
if (CheckBoxA.checked == true){ | ||||||
visible = visible.concat(KerasLayers); | ||||||
} | ||||||
if (CheckBoxB.checked == true){ | ||||||
visible = visible.concat(TensorFlowLayers); | ||||||
} | ||||||
if (CheckBoxC.checked == true){ | ||||||
visible = visible.concat(CaffeLayers); | ||||||
} | ||||||
|
||||||
for (let elem of $('.drowpdown-button')) { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Uneven Indentation |
||||||
for (let j = 0; j < visible.length; j++){ | ||||||
let id = elem.id; | ||||||
if(id == visible[j]){ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. space after |
||||||
elem.classList.remove("hide"); | ||||||
j = visible.length + 1; | ||||||
}else{ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Put |
||||||
elem.classList.add("hide"); | ||||||
} | ||||||
} | ||||||
} | ||||||
|
||||||
} | ||||||
|
||||||
render() { | ||||||
return ( | ||||||
<div> | ||||||
<div className="form-group pull-right"> | ||||||
<div className="dropdown"> | ||||||
<button id="topbar-icon" className="btn btn-default dropdown-toggle form-control" data-toggle="dropdown"> | ||||||
<span className="glyphicon glyphicon-list-alt" aria-hidden="true"></span> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I think this should look better |
||||||
</button> | ||||||
<ul className="dropdown-menu pull-right"> | ||||||
<li> | ||||||
<a className="btn"> | ||||||
<input type="checkbox" id="CheckBoxA" value="A" onChange={this.changeEvent} /> | ||||||
<label>Keras</label> | ||||||
</a> | ||||||
</li> | ||||||
<li> | ||||||
<a className="btn"> | ||||||
<input type="checkbox" id="CheckBoxB" value="B" onChange={this.changeEvent} /> | ||||||
<label>Tensorflow</label> | ||||||
</a> | ||||||
</li> | ||||||
<li> | ||||||
<a className="btn"> | ||||||
<input type="checkbox" id="CheckBoxC" value="C" onChange={this.changeEvent} /> | ||||||
<label>Caffe</label> | ||||||
</a> | ||||||
</li> | ||||||
</ul> | ||||||
</div> | ||||||
</div> | ||||||
</div> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please resolve the below webpack error (lines 96 and 97):
|
||||||
) | ||||||
} | ||||||
} | ||||||
export default FilterBar; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -461,10 +461,109 @@ class Pane extends React.Component { | |
</div> | ||
</div> | ||
|
||
|
||
); | ||
} | ||
} | ||
|
||
// class FilterBar extends React.Component { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove comments if you're sure about your changes. |
||
// constructor(props) { | ||
// super(props); | ||
// this.changeEvent= this.changeEvent.bind(this); | ||
// } | ||
|
||
// changeEvent() { | ||
// var KerasLayers = ["RNN_Button", "GRU_Button", "LSTM_Button", "Embed_Button", "Eltwise_Button", | ||
// "ThresholdedReLU", "ReLU_Button", "PReLU_Button", "Softmax_Button", "BatchNorm_Button", | ||
// "GaussianNoise_Button", "GaussianDropout_Button", "AlphaDropout_Button", "TimeDistributed_Button", | ||
// "Bidirectional_Button", "RepeatVector_Button", "Masking_Button", "Permute_Button", "InnerProduct_Button", | ||
// "Deconvolution_Button", "Regularization_Button", "Softsign_Button", "Upsample_Button", "Pooling_Button", | ||
// "LocallyConnected_Button", "Crop_Button"]; | ||
// var TensorFlowLayers = ["RNN_Button", "GRU_Button", "LSTM_Button", "Embed_Button", "Eltwise_Button", | ||
// "ThresholdedReLU", "ReLU_Button", "PReLU_Button", "Softmax_Button", "BatchNorm_Button", "GaussianNoise_Button", | ||
// "GaussianDropout_Button", "AlphaDropout_Button", "TimeDistributed_Button", "Bidirectional_Button", | ||
// "RepeatVector_Button", "Masking_Button", "Permute_Button", "InnerProduct_Button", "Deconvolution_Button", | ||
// "Regularization_Button", "Softsign_Button", "Upsample_Button", "Pooling_Button", "LocallyConnected_Button", | ||
// "SoftmaxWithLoss_Button", "SigmoidCrossEntropyLoss_Button", "Crop_Button", "DepthwiseConv_Button"]; | ||
// var CaffeLayers = ["ImageData_Button", "HDF5Data_Button", "HDF5Output_Button", "Input_Button", "WindowData_Button", | ||
// "MemoryData_Button", "DummyData_Button", "Convolution_Button", "Pooling_Button", "SPP_Button", "Deconvolution_Button", | ||
// "Recurrent_Button", "RNN_Button", "LSTM_Button", "LRN_Button", "MVN_Button", "BatchNorm_Button", | ||
// "InnerProduct_Button", "Dropout_Button", "Embed_Button", "ReLU_Button", "PReLU_Button", "ELU_Button", | ||
// "Sigmoid_Button", "TanH_Button", "AbsVal_Button", "Power_Button", "Exp_Button", "Log_Button", "BNLL_Button", | ||
// "Threshold_Button", "Bias_Button", "Scale_Button", "Softplus_Button", "HardSigmoid_Button", "Flatten_Button", | ||
// "Reshape_Button", "BatchReindex_Button", "Split_Button", "Concat_Button", "Eltwise_Button", "Filter_Button", | ||
// "Reduction_Button", "Silence_Button", "ArgMax_Button", "Softmax_Button", "MultinomialLogisticLoss_Button", | ||
// "InfogainLoss_Button", "SoftmaxWithLoss_Button", "EuclideanLoss_Button", "HingeLoss_Button", | ||
// "SigmoidCrossEntropyLoss_Button", "Accuracy_Button", "ContrastiveLoss_Button", "Data_Button", "Crop_Button"]; | ||
// var CheckBoxA = document.getElementById("CheckBoxA"); | ||
// var CheckBoxB = document.getElementById("CheckBoxB"); | ||
// var CheckBoxC = document.getElementById("CheckBoxC"); | ||
// var visible = []; | ||
// if(CheckBoxA.checked == false & CheckBoxB.checked == false & CheckBoxC.checked == false){ | ||
// for (let elem of $('.drowpdown-button')) { | ||
// elem.classList.remove("hide"); | ||
// } | ||
// } | ||
// if (CheckBoxA.checked == true){ | ||
// visible = visible.concat(KerasLayers); | ||
// } | ||
// if (CheckBoxB.checked == true){ | ||
// visible = visible.concat(TensorFlowLayers); | ||
// } | ||
// if (CheckBoxC.checked == true){ | ||
// visible = visible.concat(CaffeLayers); | ||
// } | ||
|
||
// for (let elem of $('.drowpdown-button')) { | ||
// for (let j = 0; j < visible.length; j++){ | ||
// let id = elem.id; | ||
// if(id == visible[j]){ | ||
// elem.classList.remove("hide"); | ||
// j = visible.length + 1; | ||
// }else{ | ||
// elem.classList.add("hide"); | ||
// } | ||
// } | ||
// } | ||
|
||
// } | ||
|
||
// render() { | ||
// return ( | ||
// <div> | ||
// <div className="form-group"> | ||
// <div className="filter dropdown"> | ||
// <button id="fiter-button" className="filter btn btn-default dropdown-toggle form-control" data-toggle="dropdown"> | ||
// <span className="glyphicon glyphicon-list-alt" aria-hidden="true"><label>Filters</label></span> | ||
// </button> | ||
// <ul className="dropdown-menu"> | ||
// <li> | ||
// <a className="btn"> | ||
// <input type="checkbox" id="CheckBoxA" value="A" onChange={this.changeEvent} /> | ||
// <label>Keras</label> | ||
// </a> | ||
// </li> | ||
// <li> | ||
// <a className="btn"> | ||
// <input type="checkbox" id="CheckBoxB" value="B" onChange={this.changeEvent} /> | ||
// <label>Tensorflow</label> | ||
// </a> | ||
// </li> | ||
// <li> | ||
// <a className="btn"> | ||
// <input type="checkbox" id="CheckBoxC" value="C" onChange={this.changeEvent} /> | ||
// <label>Caffe</label> | ||
// </a> | ||
// </li> | ||
// </ul> | ||
// </div> | ||
// </div> | ||
// </div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please resolve the below webpack error (lines 560 and 561). Just removing the comments would do as well, but mentioning it anyway:
|
||
// ) | ||
// } | ||
// } | ||
|
||
|
||
|
||
Pane.propTypes = { | ||
handleClick: React.PropTypes.func.isRequired, | ||
setDraggingLayer: React.PropTypes.func.isRequired | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please resolve the below webpack error (line 1314):