Current section

Files

Jump to
evision lib assets zoo yunet.js
Raw

lib/assets/zoo/yunet.js

import { Base } from "../base.js";
const YuNetModel = (current_namespace) => {
return {
name: "YuNetModel",
components: {
BaseInput: Base.BaseInput,
BaseSelect: Base.BaseSelect,
},
props: {
fields: {
type: Object,
default: {},
}
},
data() {
return {
x_type: [
{ label: "32-bit Float", value: "f32" },
{ label: "32-bit Integer", value: "s32" }
],
y_type: [
{ label: "32-bit Float", value: "f32" },
{ label: "32-bit Integer", value: "s32" }
],
data_layout: [
{ label: "Row", value: "row" },
{ label: "Column", value: "col" }
],
shuffle_dataset: [
{ label: "Yes", value: true },
{ label: "No", value: false }
]
}
},
template: `
<div class="row mixed-row">
<p>YuNet</p>
</div>
`,
}
};
const YuNetSmartCellConfig = (ctx, info) => {
const extra_components = {
YuNetModel: YuNetModel(""),
};
var config = Base.SmartCellConfig(ctx, info, extra_components, {});
config.template = `
<div class="app">
<form @change="handleFieldChange">
<div class="container">
<YuNetModel v-bind:fields="fields" />
</div>
</form>
</div>
`;
return config;
}
export const YuNet = {
YuNetModel: YuNetModel,
SmartCell: {
"evision.zoo.yunet": YuNetSmartCellConfig,
}
};