我有一个训练有素的冻结图,我试图在ARM设备上运行.基本上,我使用的是contrib/pi_examples/label_image,但使用的是我的网络而不是Inception.我的网络受到了辍学的训练,现在让我遇到麻烦:
Invalid argument: No OpKernel was registered to support Op 'Switch' with these attrs. Registered kernels:
device='CPU'; T in [DT_FLOAT]
device='CPU'; T in [DT_INT32]
device='GPU'; T in [DT_STRING]
device='GPU'; T in [DT_BOOL]
device='GPU'; T in [DT_INT32]
device='GPU'; T in [DT_FLOAT]
[[Node: l_fc1_dropout/cond/Switch = Switch[T=DT_BOOL](is_training_pl, is_training_pl)]]
Run Code Online (Sandbox Code Playgroud)
我能看到的一个解决方案是构建包含相应操作的TF静态库.另一方面,从网络中消除丢失操作以使其更简单和更快可能是更好的主意.有没有办法做到这一点?
谢谢.
我已经看过其他类似的问题,但是他们似乎总是在XAML中这样做,因为这是在事件处理程序中,所以我需要找出c#中的答案。基本上,我只需要发送菜单项闪烁红色即可。
ColorAnimation ca = new ColorAnimation()
{
From = Color.FromRgb(0, 0, 0),
To = Color.FromRgb(255,0,0),
AutoReverse = true,
RepeatBehavior = new RepeatBehavior(3),
Duration=new Duration(TimeSpan.FromSeconds(.5))
};
(sender as MenuItem).Foreground.BeginAnimation(SolidColorBrush.ColorProperty, ca);
Run Code Online (Sandbox Code Playgroud)